Files helper class
| access | public |
|---|---|
| package | kocuj_internal_lib |
checkDirWritable(string $dir) : boolean
| access | public |
|---|
stringDirectory to check
booleanDirectory exists and is writable (true) or not (false)copyFiles(string $from, string $to, $output, array $attr = array()) : boolean
| access | public |
|---|
stringDirectory from which files should be copied
stringDirectory to which files should be copied
arrayAttributes; there are the following keys available: "extlist" (array type; list of files extensions to get), "getdirs" (bool type; if true, directories will be get), "getfiles" (bool type; if true, files will be get), "ignoredirerrors" (bool type; if true, errors during removing the directory will not be set), "ignoreitems" (array type; list of files and directories to ignore; if file or directory has to be ignored also in all subdirectories, it should begin with "*" and "/"), "withsubdirs" (bool type; if true, files are also get from subdirectories) - default: empty
booleanFiles has been removed correctly (true) or there was an error (false)createFile(string $filename, string $content = '') : boolean
| access | public |
|---|
stringFilename
stringFile content - default: empty
booleanFile has been created correctly (true) or there was an error (false)getFilesList(string $dir, array $attr = array()) : array
| access | public |
|---|
stringDirectory
arrayAttributes; there are the following keys available: "extlist" (array type; list of files extensions to get), "getdirs" (bool type; if true, directories will be get), "getfiles" (bool type; if true, files will be get), "ignoreitems" (array type; list of files and directories to ignore; if file or directory has to be ignored also in all subdirectories, it should begin with "*" and "/"), "sort" (bool type; if true, files are sorted), "withsubdirs" (bool type; if true, files are also get from subdirectories) - default: empty
arrayFiles and subdirectories list; each element contains the following keys: "filename" (string type; file or directory name), "isdir" (bool type: true if it is directory, false if it is file)getInstance() : object
| access | public |
|---|
objectSingleton instancegetRelativePath(string $from, string $to) : string
| access | public |
|---|
stringFrom path
stringTo path
stringRelative pathremoveFiles(string $dir, $output, array $attr = array()) : boolean
| access | public |
|---|
stringDirectory
arrayAttributes; there are the following keys available: "extlist" (array type; list of files extensions to get), "getdirs" (bool type; if true, directories will be get), "getfiles" (bool type; if true, files will be get), "ignoredirerrors" (bool type; if true, errors during removing the directory will not be set), "ignoreitems" (array type; list of files and directories to ignore; if file or directory has to be ignored also in all subdirectories, it should begin with "*" and "/"), "withsubdirs" (bool type; if true, files are also get from subdirectories) - default: empty
booleanFiles has been removed correctly (true) or there was an error (false)__clone() : void
| access | private |
|---|
__construct() : void
| access | private |
|---|
getFilesListReccurence(string $rootDir, string $subDir, array $attr) : array
| access | private |
|---|
stringRoot directory
stringSubdirectory
arrayAttributes; there are the following keys available: "extlist" (array type; list of files extensions to get), "getdirs" (bool type; if true, directories will be get), "getfiles" (bool type; if true, files will be get), "ignoreitems" (array type; list of files and directories to ignore; if file or directory has to be ignored also in all subdirectories, it should begin with "*" and "/"), "sort" (bool type; if true, files are sorted), "withsubdirs" (bool type; if true, files are also get from subdirectories)
arrayFiles and subdirectories list; each element contains the following keys: "filename" (string type; file or directory name), "isdir" (bool type: true if it is directory, false if it is file)$instance : object
NULL| access | private |
|---|