Optionalpath: string
Workspace-relative directory to list. Omit or pass null for the workspace root.
Name-sorted entries directly inside the directory.
Listing is not recursive: call List again with a subdirectory path to descend. Entries are sorted by name so repeated calls are stable. Links and reparse points are never listed, so every entry is a real file or a real directory. At most 4096 entries are returned and an over-full directory rejects rather than truncating silently, because a silently short listing would read as an empty directory. A missing or non-directory path rejects; an existing but empty directory returns an empty array.
Describes one workspace entry, or resolves null when nothing is there.
Workspace-relative path to describe.
The entry, or null when nothing exists at that path.
A missing entry resolves with null rather than rejecting, so an existence check does not need a try/catch. An invalid path still rejects. A link or reparse point resolves as null, because the sandbox does not treat one as a real entry.
Reads a workspace file as UTF-8 text.
Workspace-relative file to read.
The file decoded as UTF-8 text.
Bytes are decoded as UTF-8 with malformed sequences replaced, so this never rejects on encoding. It reads at most one-eighth of the effective script heap, the same availability budget HTTP response bodies use, and rejects with limit_exceeded above it rather than growing the isolate. That budget is why binary files belong in HTTP.UploadFile, which streams them natively without ever building a JavaScript string. A missing path, a directory, or a link rejects.
Writes UTF-8 text to a workspace file, replacing any existing contents.
Workspace-relative file to write.
Text to encode as UTF-8 and store.
Resolves once the new contents are durably published.
Missing intermediate directories in the path are created. Unlike HTTP.DownloadFile, this deliberately replaces an existing file: a script rewriting its own output should not have to delete first. The write goes to a sibling temporary file and is published atomically, so an interrupted write leaves the previous contents intact rather than a truncated file. Text is encoded as UTF-8.
Creates a directory inside the workspace, including missing parents.
Workspace-relative directory to create.
Resolves once the directory exists.
Deletes one workspace file or one empty directory.
Workspace-relative entry to delete.
True when something was deleted, false when nothing was there.
Deleting something that is not there resolves false rather than rejecting, so cleanup does not need a try/catch. A non-empty directory rejects: this deliberately has no recursive delete, so a single wrong path cannot erase a tree of user files. Delete the entries first, or leave the directory in place.
Moves or renames a workspace entry without overwriting anything.
Workspace-relative entry to move.
Workspace-relative destination that must not already exist.
Resolves once the entry is at its new path.
Both paths are workspace-relative and resolved through the same sandbox, so a move can never leave the workspace. Missing intermediate directories in the destination are created. An existing destination rejects rather than being replaced, matching HTTP.DownloadFile: delete it first if replacing is intended.
Lists the files and directories directly inside this script's workspace.