Files helper class
access | public |
---|---|
package | kocuj_internal_lib |
checkDirWritable(string $dir) : boolean
access | public |
---|
string
Directory to check
boolean
Directory exists and is writable (true) or not (false)copyFiles(string $from, string $to, $output, array $attr = array()
) : boolean
access | public |
---|
string
Directory from which files should be copied
string
Directory to which files should be copied
array
Attributes; 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
boolean
Files has been removed correctly (true) or there was an error (false)createFile(string $filename, string $content = ''
) : boolean
access | public |
---|
string
Filename
string
File content - default: empty
boolean
File has been created correctly (true) or there was an error (false)getFilesList(string $dir, array $attr = array()
) : array
access | public |
---|
string
Directory
array
Attributes; 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
array
Files 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 |
---|
object
Singleton instancegetRelativePath(string $from, string $to) : string
access | public |
---|
string
From path
string
To path
string
Relative pathremoveFiles(string $dir, $output, array $attr = array()
) : boolean
access | public |
---|
string
Directory
array
Attributes; 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
boolean
Files 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 |
---|
string
Root directory
string
Subdirectory
array
Attributes; 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)
array
Files 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 |
---|