Functions23 public, 1 private
Appends the specified file extension if not already present. | |||
public | string | appendFileExtension | |
required | string | fileName | |
required | string | fileExtension | |
Returns the number of bytes in the specified file or folder. | |||
public | numeric | calculateFileSize | |
required | string | uri | |
boolean | recurse | true | |
Deletes the specified file. Returns if the file has been deleted. Will not throw any exception. | |||
public | boolean | deleteFileIfExists | |
required | string | filePath | |
Detects and returns the joint in the provided path. | |||
public | string | detectJoint | |
required | string, string[] | path | |
Copies the specified directory and its content. | |||
public | struct | directoryCopy | |
required | string | source | |
required | string | destination | |
struct | OPTIONS | {} | |
option | string, string[] | filters.file | [] |
option | boolean | filters.fileAllowRegEx | true |
values within / / will be treated as regular expression, you may provide an array in an array to require a folder hierarchy, e.g.: { filters: { folder: [ [ "A", "B" ] ] } } will filter folder "B", when folder "B" is beneath folder "A" | |||
option | string, string[] | filters.folder | [] |
option | boolean | filters.folderAllowRegEx | true |
maximum time difference of last modification in number of days | |||
option | numeric | filters.maxAge | 0 |
option | boolean | recurse | true |
Creates the specified directory including any necessary but non-existent parent directories. Advantage over CF's directoryCreate: doesn't fail on existing folders and thus not affected by race conditions. | |||
public | boolean | directoryCreate | |
required | string | path | |
Filters the content of specified directory. | |||
public | struct | filterDirectory | |
required | string, query | directory | |
struct | OPTIONS | {} | |
option | string, string[] | filters.file | [] |
option | boolean | filters.fileAllowRegEx | true |
values within / / will be treated as regular expression, you may provide an array in an array to require a folder hierarchy, e.g.: { filters: { folder: [ [ "A", "B" ] ] } } will filter folder "B", when folder "B" is beneath folder "A" | |||
option | string, string[] | filters.folder | [] |
option | boolean | filters.folderAllowRegEx | true |
maximum time difference of last modification in number of days | |||
option | numeric | filters.maxAge | 0 |
option | boolean | recurse | true |
public | boolean | folderIsEmpty | |
required | string | path | |
boolean | throwException | false | |
Attempts to resolve the specified path. | |||
public | string | getRealPath | |
required | string | pathToResolve | |
public | boolean | isDirectory | |
required | any | path | |
Returns if the specified path is considered as already expanded. The path is checked against Windows and *NIX filesystem. | |||
public | boolean | isExpandedPath | |
required | string | path | |
public | boolean | isFile | |
required | string | path | |
public | boolean | isSymbolicLink | |
required | string | path | |
Lists all files in the provided directory. | |||
public | array | listFiles | |
required | string | directoryPath | |
boolean | recurse | false | |
"ASC", "DESC" | sort | ASC | |
string | filter | *.* | |
Lists all files in the provided directory without following symbolic links. | |||
public | array | listFilesNoSymLink | |
required | string | directoryPath | |
boolean | recurse | false | |
"ASC", "DESC" | sort | ASC | |
string | filter | *.* | |
Lists all folders in the provided directory. | |||
public | array | listFolders | |
required | string | directoryPath | |
boolean | recurse | false | |
"ASC", "DESC" | sort | ASC | |
Determines the file extension of the provided file path. | |||
public | string | getFileExtension | |
File path that contains a file extension. | |||
required | string | filePath | |
Inspects the provided URI for the specified file extensions. | |||
public | boolean | hasFileExtension | |
required | string | uri | |
case-insensitive | |||
array, string | extension | [] | |
Joins the provided paths. | |||
public | string | joinFilePaths | |
required | any | path1 | |
any | path2 | ||
Either forward slash or backward slash. Leave empty to detect automatically. | |||
string | joint | ||
Parses the specified amount (bits or bytes) and unit and returns the converted amount in bytes. | |||
public | numeric | parseAsBytes | |
required | any | value | |
Returns the path after going one directory up, e.g.: "/path/to/top" will return "/path/to" | |||
public | string | pathUp | |
required | string | path | |
Removes a single file extension. | |||
public | string | removeFileExtension | |
required | string | fileName | |
public | string | stringifyBytes | |
required | any | bytes | |
numeric | round | 2 | |
"auto", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" | unit | auto | |
struct | OPTIONS | {} | |
option | string | space | |
option | array | units | [] |