#fs.create_file(path: string) → nil
Creates an empty file at path. Errors if the path already exists as a file or directory.
createfileParameters
| path | string | File path to create. |
Sandboxed filesystem access scoped to the Madius workspace. Supports synchronous and asynchronous read, write, append, and directory enumeration.
Creates an empty file at path. Errors if the path already exists as a file or directory.
createfile| path | string | File path to create. |
Creates a directory (and any missing parents) at path. Errors if the path already exists as a file or directory.
createdirectory| path | string | Directory path to create. |
Overwrites the file at path with the contents of data. The file must already exist. Yields until the write completes.
writeasync| path | string | File path relative to the Workspace directory. |
| data | buffer | Data to write. |
Reads the entire contents of the file at path into a buffer. The file must exist and be smaller than the internal buffer size limit. Yields until the read completes.
readasync| path | string | File path relative to the Workspace directory. |
Appends the contents of data to the end of the file at path. The file must already exist. Yields until the write completes.
appendasync| path | string | File path relative to the Workspace directory. |
| data | buffer | Data to append. |
Returns whether path points to an existing regular file.
isfile| path | string | Path to check. |
Returns whether path points to an existing directory.
isdirectory| path | string | Path to check. |
Returns an array of paths for all subdirectories inside directory.
listdirectories| directory | string | Directory path. |
Returns an array of paths for all entries (files and directories) inside directory.
listobjects| directory | string | Directory path. |
Returns an array of paths for all regular files inside directory.
listfiles| directory | string | Directory path. |