src/BoomCMS/Support/Str.php
public static function filesize($bytes)
    {
        $precision = (($bytes % 1024) === 0 || $bytes <= 1024) ? 0 : 1;

        $formatter = new ByteSize\Formatter\Binary();
        $formatter->setPrecision($precision);

        return $formatter->format($bytes);
    }
public static function filesize($bytes)
    {
        $precision = (($bytes % 1024) === 0 || $bytes <= 1024) ? 0 : 1;

        $formatter = new ByteSize\Formatter\Binary();
        $formatter->setPrecision($precision);

        return $formatter->format($bytes);
    }
public static function filesize ( $ bytes ) { $ precision = ( ( $ bytes % 1024 ) === 0 || $ bytes <= 1024 ) ? 0 : 1 ; $ formatter = new ByteSize \ Formatter \ Binary ( ) ; $ formatter -> setPrecision ( $ precision ) ; return $ formatter -> format ( $ bytes ) ; }
Turn a number of bytes into a human friendly filesize.

@param int $bytes

@return string
Turn a number of bytes into a human friendly filesize .