PHP Class Plank\Mediable\Helpers\File

Author: Sean Fraser ([email protected])
Show file Open project: plank/laravel-mediable Class Usage Examples

Public Methods

Method Description
cleanDirname ( string $path ) : string Get the directory name of path, trimming unecessary . and / characters.
readableSize ( integer $bytes, integer $precision = 1 ) : string Generate a human readable bytecount string.

Method Details

cleanDirname() public static method

Get the directory name of path, trimming unecessary . and / characters.
public static cleanDirname ( string $path ) : string
$path string
return string

readableSize() public static method

Generate a human readable bytecount string.
public static readableSize ( integer $bytes, integer $precision = 1 ) : string
$bytes integer
$precision integer
return string