Object -
internal :
Path
Reference to the file location.
Constructor
__init
(string root)
- root string
Methods
Retreives the absolute path from the provided location.
Retreives the name of the file from the provided location.
Retreives the extension of the file from the provided location.
Check for existance of the file.
Returns the files of folders in the directory.
Check if given file is a directory
Deletes a file/directory.
Creates a directory.
Creates a file.
Retrieves the last modified time of the file of directory.
Copy file or directory to another path.
Move file or directory to another path.
Get the enclosing parent directory.
Resolve given path.
Retreives the absolute path from the provided location.
-
Return Type
(string) Returns the absolute path as a string
Retreives the name of the file from the provided location.
-
Return Type
(string) Returns the name of the file
Retreives the extension of the file from the provided location.
-
Return Type
(string) Returns the extension of the file. Empty string if no extension.
Check for existance of the file.
-
Return Type
(boolean) True if the file exists, else false
Returns the files of folders in the directory.
Check if given file is a directory
-
Return Type
(boolean) True if directory, else false
Deletes a file/directory.
-
Return Type
(error?) Error if the directory/file could not be deleted
Creates a directory.
-
Return Type
(error?) Error if the directory could not be created
Creates a file.
-
Return Type
(error?) Error if the file could not be created
Retrieves the last modified time of the file of directory.
Copy file or directory to another path.
Parameters
- target Path
-
The location to copy file or directory
-
Return Type
(error?) Error if the file could not be copied
Move file or directory to another path.
Parameters
- target Path
-
The location to move file or directory
-
Return Type
(error?) Error if the file could not be moved
Get the enclosing parent directory.