Skip to main content
Every FissionPlane sandbox exposes a filesystem API through its data-plane agent. You can write bytes, read them back, list directories, inspect metadata, move entries, remove paths, and open a live watch stream over WebSocket — all without shelling out to a command. This page covers each operation in TypeScript, Python, and Rust.
Filesystem operations go directly to the sandbox’s data-plane agent, bypassing the control plane entirely. This keeps throughput high and latency low for workloads that transfer many files or poll directories frequently.

Write a file

Pass a path and a byte buffer to files.write(). The agent creates any missing parent directories automatically.

Read a file

files.read() returns the raw bytes of a file. Decode them in your application layer.

List a directory

files.list() returns the entries in a directory. Each entry includes at minimum a name and a flag indicating whether it is itself a directory.

Stat a file

files.stat() returns metadata for a single path: name, byte size, whether it is a directory, and the last-modified timestamp.

Make a directory

Create a directory (and any missing ancestors) with files.makeDir() / files.make_dir().

Move or rename a path

files.move() / files.move_() (Python) moves or renames a file or directory. The destination path must not already exist.

Remove a path

files.remove() deletes a file or an empty directory. Pass a recursive flag to delete a non-empty directory tree.

Watch for filesystem changes

files.watch() opens a WebSocket connection and streams inotify events for a path. Pass recursive: true to include all subdirectories. Each event carries the path that changed and the kind of change (create, modify, delete, rename).
For transferring large files or binary blobs, use files.upload() and files.download() instead of files.write() and files.read(). These methods stream data in chunks and are designed for file-transfer use cases where reading the entire payload into memory at once is impractical.