Method | Description | |
---|---|---|
__construct ( string $path, boolean $checkPath = true ) | Constructs a new file from the given path. | |
getExtension ( ) : string | Returns the extension of the file. | |
getMimeType ( ) : string | null | Returns the mime type of the file. | |
guessExtension ( ) : string | null | Returns the extension based on the mime type. | |
move ( string $directory, string $name = null ) : |
Moves the file to a new location. |
public __construct ( string $path, boolean $checkPath = true ) | ||
$path | string | The path to the file |
$checkPath | boolean | Whether to check the path or not |
public getExtension ( ) : string | ||
return | string | The extension |
public getMimeType ( ) : string | null | ||
return | string | null | The guessed mime type (i.e. "application/pdf") |
public guessExtension ( ) : string | null | ||
return | string | null | The guessed extension or null if it cannot be guessed |