sandbox.files.
await sandbox.files.read(path)
Read a file as a UTF-8 string. HTTP API →
Absolute path to the file
str
await sandbox.files.read_bytes(path)
Read a file as raw bytes.
Absolute path to the file
bytes
await sandbox.files.write(path, content)
Write content to a file. HTTP API →
Absolute path for the destination file
File content
None
await sandbox.files.list(path="/")
List directory contents. HTTP API →
Directory path
list[EntryInfo]
await sandbox.files.make_dir(path)
Create a directory. HTTP API →
Directory path
None
await sandbox.files.remove(path)
Delete a file or directory. HTTP API →
Path to remove
None
await sandbox.files.exists(path)
Check if a path exists. Client-side wrapper — attempts a read and returns False on error.
Path to check
bool
Types
EntryInfo
EntryInfo