File System
Provides a cross platform API to create and manage files. Functions with path params can be absolute or relative to the cwd.
Reads a file as raw bytes. Returns the contents on success or null.
Reads a file as a UTF-8 string. Returns the contents on success or null.
Writes raw bytes to a file. If the file already exists, it's replaced. Returns true on success or false.
Writes UTF-8 text to a file. If the file already exists, it's replaced. Returns true on success or false.
Appends raw bytes to a file. File is created if it doesn't exist. Returns true on success or false.
Appends UTF-8 text to a file. File is created if it doesn't exist. Returns true on success or false.
Copies a file.
Moves a file.
Returns the absolute path of the current working directory.
Returns info about a file, folder, or special object at a given path.
List the files in a directory. This is not recursive.
Ensures that a path exists by creating parent directories as necessary.
Returns whether something exists at a path.
Removes a file.
Removes a directory.
Expands relative pathing such as '..' from the cwd and returns an absolute path. See realPath to resolve symbolic links.
Expands relative pathing from the cwd and resolves symbolic links. Returns the canonicalized absolute path. Path provided must point to a filesystem object.
Creates a symbolic link (a soft link) at symPath to an existing or nonexisting file at targetPath.