메소드 |
설명 |
|
__construct ( string $file, array $types = null ) : File |
Constructor |
|
addAllowedTypes ( array $types ) : void |
Set the allowed files types. |
|
append ( string $data ) : File |
Append data to a file. |
|
checkDupe ( string $file, string $dir = null ) : string |
Static method to check for a duplicate file, returning
the next incremented filename, i.e. filename_1.txt |
|
copy ( string $new, boolean $overwrite = false ) : File |
Copy the file object directly to another file on disk. |
|
delete ( ) : void |
Delete the file object directly from disk. |
|
getAllowedTypes ( ) : array |
Get the current allowed files types. |
|
getBasename ( ) : string |
Get the basename. |
|
getDir ( ) : string |
Get the directory. |
|
getDirGroup ( ) : array |
Get the owner of the file. Works on POSIX file systems only |
|
getDirOwner ( ) : array |
Get the owner of the file. Works on POSIX file systems only |
|
getDirPermissions ( ) : string |
Get the permissions of the directory the file is in. |
|
getExt ( ) : string |
Get the extension. |
|
getFilename ( ) : string |
Get the filename. |
|
getFullpath ( ) : string |
Get the fullpath. |
|
getGroup ( ) : array |
Get the owner of the file. Works on POSIX file systems only |
|
getMime ( ) : string |
Get the current file mime type. |
|
getOwner ( ) : array |
Get the owner of the file. Works on POSIX file systems only |
|
getPermissions ( ) : string |
Get the permissions of the file. |
|
getSize ( ) : string |
Get the current file size. |
|
getUser ( ) : array |
Get current user. Works on POSIX file systems only |
|
isAllowed ( string $type ) : boolean |
Test if a certain file type is allowed. |
|
isDir ( ) : boolean |
Is dir object. |
|
isFile ( ) : boolean |
Is file object. |
|
move ( string $new, boolean $overwrite = false ) : File |
Move the file object directly to another location on disk. |
|
output ( boolean $download = false ) : File |
Output the file object directly. |
|
read ( integer | string $off = null, integer | string $len = null ) : string |
Read data from a file. |
|
save ( string $to = null, boolean $append = false ) : File |
Save the file object to disk. |
|
setAllowedTypes ( array $types = null ) : void |
Set the allowed files types, overriding any previously allowed types. |
|
setDirPermissions ( mixed $mode ) : File |
Change the permissions of the directory the file is in. |
|
setMime ( string $mime ) : File |
Set the file mime type. |
|
setPermissions ( mixed $mode ) : File |
Change the permissions of the file. |
|
upload ( string $upload, string $file, integer $size, array $types = null ) : File |
Static method to upload a file and return a file object. |
|
write ( string $data, boolean $append = false ) : File |
Write data to a file. |
|