sandbox.files.
sandbox.files.read(path)
Read a file as a UTF-8 string. HTTP API →
string
required
Absolute path to the file
Promise<string>
sandbox.files.readBytes(path)
Read a file as raw bytes.
string
required
Absolute path to the file
Promise<Uint8Array>
sandbox.files.write(path, content)
Write content to a file. HTTP API →
string
required
Absolute path for the destination file
string | Uint8Array
required
File content
Promise<void>
sandbox.files.list(path?)
List directory contents. HTTP API →
string
default:"/"
Directory path
Promise<EntryInfo[]>
sandbox.files.makeDir(path)
Create a directory (recursive). HTTP API →
string
required
Directory path
Promise<void>
sandbox.files.remove(path)
Delete a file or directory. HTTP API →
string
required
Path to remove
Promise<void>
sandbox.files.readStream(path)
Stream a file as a ReadableStream. Avoids buffering the entire file in memory — ideal for large files (50MB+).
string
required
Absolute path to the file
Promise<ReadableStream<Uint8Array>>
sandbox.files.writeStream(path, stream)
Stream content to a file. Accepts a ReadableStream or Uint8Array without buffering an extra copy in memory.
string
required
Absolute path for the destination file
ReadableStream<Uint8Array> | Uint8Array
required
File content as a stream or byte array
Promise<void>
sandbox.files.exists(path)
Check if a path exists. Client-side wrapper — attempts a read and returns false on error.
string
required
Path to check
Promise<boolean>
Types
EntryInfo
EntryInfo