메소드 |
설명 |
|
append ( string $file, mixed $content ) : boolean |
Appends new content to an existing file |
|
base64 ( string $file ) : string |
Returns the file content as base64 encoded string |
|
copy ( string $file, string $target ) : boolean |
Copy a file to a new location. |
|
dirname ( string $file ) : string |
Just an alternative for dirname() to stay consistent |
|
download ( $file, $name = null ) |
*
Automatically sends all needed headers for the file to be downloaded
and echos the file's content |
|
exists ( string $file ) : boolean |
Checks if a file exists |
|
extension ( string $file, string $extension = false ) : string |
Gets the extension of a file |
|
extensionToMime ( string $extension ) : string |
Converts a file extension to a mime type |
|
extensionToType ( string $extension ) : string |
Returns the file type for a passed extension |
|
extensions ( string $type = null ) : array |
Returns all extensions for a certain file type |
|
filename ( string $name ) : string |
Extracts the filename from a file path |
|
is ( string $file, string $value ) : boolean |
Checks if a file is of a certain type |
|
isReadable ( string $file ) : boolean |
Checks if the file is readable |
|
isWritable ( string $file ) : boolean |
Checks if the file is writable |
|
load ( $file, $data = [] ) |
Safely requires a file if it exists |
|
mime ( string $file ) : mixed |
Returns the mime type of a file |
|
mimeToExtension ( string $mime ) : string |
Converts a mime type to a file extension |
|
mimeToType ( string $mime ) : string |
Returns the type for a given mime |
|
mimes ( ) : array |
Returns all detectable mime types |
|
modified ( string $file, string $format = null, string $handler = 'date' ) : integer |
Get the file's last modification time. |
|
move ( string $old, string $new ) : boolean |
Moves a file to a new location |
|
name ( string $name ) : string |
Extracts the name from a file path or filename without extension |
|
niceSize ( mixed $size ) : string |
Converts an integer size into a human readable format |
|
read ( string $file ) : mixed |
Reads the content of a file |
|
remove ( string $file ) : boolean |
Deletes a file |
|
resolve ( string $base, array $extensions ) : string | false |
Tries to find a file by various extensions |
|
safeName ( string $string ) : string |
Sanitize a filename to strip unwanted special characters |
|
show ( string $file ) |
Read and send the file with the correct headers |
|
size ( mixed $file ) : mixed |
Returns the size of a file. |
|
type ( string $file ) : string |
Categorize the file |
|
types ( ) : array |
Returns an array of all available file types |
|
unzip ( string $file, string $to ) : boolean |
Unzips a zip file |
|
uri ( string $file ) : string |
Returns the file as data uri |
|
write ( string $file, mixed $content, boolean $append = false ) : boolean |
Creates a new file |
|