NameSummary
appendFile Appends content to file, creating it if needed.
exists Returns whether a path exists.
listdir Lists names in a directory.
mkdir Creates a directory with mode 0755.
mkdirAll Creates a directory and all parents with mode 0755.
readFile Reads the entire file and returns its contents as a string.
remove Removes a file or empty directory.
stat Returns a map with keys: size (int), mode (string), isDir (bool), mtime (float seconds).
writeFile Writes content to file, creating/truncating it.
fn appendFile(path, content) -> null
Appends content to file, creating it if needed.
Parameters
pathFilesystem path.
contentContent to append.
Returns
null
fn exists(path) -> bool
Returns whether a path exists.
Parameters
pathPath to check.
Returns
bool
fn listdir(path) -> array
Lists names in a directory.
Parameters
pathDirectory path.
Returns
fn mkdir(path) -> null
Creates a directory with mode 0755.
Parameters
pathDirectory path.
Returns
null
fn mkdirAll(path) -> null
Creates a directory and all parents with mode 0755.
Parameters
pathDirectory path.
Returns
null
fn readFile(path) -> string
Reads the entire file and returns its contents as a string.
Parameters
pathFilesystem path to read.
Returns
fn remove(path) -> null
Removes a file or empty directory.
Parameters
pathPath to remove.
Returns
null
fn stat(path) -> map
Returns a map with keys: size (int), mode (string), isDir (bool), mtime (float seconds).
Parameters
pathPath to stat.
Returns
fn writeFile(path, content) -> null
Writes content to file, creating/truncating it.
Parameters
pathFilesystem path.
contentContent to write.
Returns
null