Interface FileSystem
access this type via: io.FileSystem (provides, requires or uses)
Examine the contents of a file system and read information about individual files.
Functions
FileEntry[] getDirectoryContents(char path[])
FileInfo getInfo(char path[])
bool exists(char path[])
bool delete(char path[])
bool move(char path[], char newPath[])
bool copy(char path[], char newPath[], optional bool recursive)
bool createDirectory(char path[])
bool deleteDirectory(char path[])
char[] getFullPath(char path[])
FileEntry[] getDirectoryContents(char path[])
Get a list of files and folders in a given directory.
returns: A list of file and directory names that appear in the given directory.
FileInfo getInfo(char path[])
Get information about a specific file or directory.
bool exists(char path[])
Check if a given file or folder exists.
returns: True if the file or folder exists, false otherwise.
bool delete(char path[])
Delete a file.
returns: True if successful, false otherwise (for example if the file did not exist).
bool move(char path[], char newPath[])
Move a file or directory to a new location.
returns: True if successful, false otherwise.
bool copy(char path[], char newPath[], optional bool recursive)
Copy a file or directory to a new location.
returns: True if successful, false otherwise.
bool createDirectory(char path[])
Create a new directory.
returns: True if successful, false otherwise.
bool deleteDirectory(char path[])
Permanently delete a given directory, and all of its contents.
returns: True if successful, false otherwise.
char[] getFullPath(char path[])
Get the absolute path of the given (potentially relative) file path.