PHP Class Spatie\MediaLibrary\Helpers\File

显示文件 Open project: spatie/laravel-medialibrary Class Usage Examples

Public Methods

Method Description
getHumanReadableSize ( integer $sizeInBytes ) : string
getMimetype ( string $path ) : string * Get the mime type of a file.
renameInDirectory ( string $fileNameWithDirectory, string $newFileNameWithoutDirectory ) : string * Rename a file.

Method Details

getHumanReadableSize() public static method

public static getHumanReadableSize ( integer $sizeInBytes ) : string
$sizeInBytes integer
return string

getMimetype() public static method

* Get the mime type of a file.
public static getMimetype ( string $path ) : string
$path string
return string

renameInDirectory() public static method

* Rename a file.
public static renameInDirectory ( string $fileNameWithDirectory, string $newFileNameWithoutDirectory ) : string
$fileNameWithDirectory string
$newFileNameWithoutDirectory string
return string