Метод |
Описание |
|
__construct ( Database $db ) |
Files constructor. |
|
createDirectory ( integer | null $parent = null, string $cabin = '', string $dirName = '' ) : boolean |
Create a new directory |
|
deleteDir ( string $cabin, string $root, string $subdirectory ) : boolean |
Delete a directory |
|
deleteFile ( array $fileInfo ) : boolean |
Delete a file |
|
dirExists ( null $parent = null, string $cabin = '', string $dirName = '' ) : boolean |
Does the directory already exist? |
|
ensureDirExists ( string $absolutePath, string $cabin = 'Hull' ) : boolean |
Programmatically ensure that the directory exists. |
|
getChildrenOf ( mixed $directoryId = null, string $cabin = '' ) : array |
Get all of the directories beneath the current one |
|
getContentsTree ( string $cabin, string $base, string $thisDir ) : array |
Get the contents of a given cabin/directory, recursively |
|
getDirectoryCabin ( integer $directoryId ) : string |
Given a directory ID, get its cabin. |
|
getDirectoryId ( array $parts, string $cabin ) : integer |
Get a directory ID, should it exist. |
|
getDirectoryTree ( string $cabin = '', string $rootDir = '', string $ignore = '', string $pieces = '' ) : array |
Build a recursive directory tree |
|
getFileInfo ( string $cabin = '', array $path = null, string $filename = '' ) : array |
Get detailed file information |
|
getFilesCabin ( integer $fileId ) : string |
Given a file ID, get its Cabin |
|
getFilesInDirectory ( null $directoryId = null, string $cabin = '' ) : array |
Get all of the directories beneath the current one |
|
getMimeType ( string $filePath ) : string |
Get the MIME type for a given file. |
|
isValidName ( string $name ) : boolean |
Does this file have a valid filename? |
|
isolateFiles ( array $files = [] ) : array |
Turn PHP's native $_FILES mess into a sane array |
|
moveDir ( string $cabin, string $root, string $subdirectory, array $post = [] ) : boolean |
Move/rename a directory |
|
moveFile ( array $fileInfo, array $post, string $cabin ) : boolean |
Move/rename a file |
|
processUpload ( integer | null $directoryId = null, string $cabin = '', array $file = [], array $attribution = [] ) : array |
Process an upload. Either it returns an array with useful data,
OR it throws an UploadError |
|