Filesystem Module
The Filesystem module allows interaction with directories and files on both local and network file systems.
Filesystem module functions
directoryExists
Signature: (path: text) -> boolean.
Determines whether a directory exists at the specified path.
Output: Returns True if the directory exists, False otherwise.
createDirectory
Signature: (path: text) -> text.
Creates all directories at the specified path. This operation does not duplicate existing directories. An error will be thrown if the path contains invalid characters.
Output: Returns the path of the newly created directory.
write
Signature: (path: text, content: text | text*)
Signature: (path: text, content: text | text*, isOverwrite: bool)
Writes the specified text or sequence of texts to a file within an existing directory. If a file with the given name already exists, the isOverwrite parameter determines whether it should be replaced.
Last updated
Was this helpful?