# Use SDK filesystem operations

Collection: sdk
Human docs: https://zei.sh/docs/sdk

Read and write files inside the sandbox root.

The provider maps readFile, writeFile, mkdir, readdir, exists, and remove to sandboxd. The session client adds readText, writeText, makeDirectory, listDirectory, stat, exists, and remove.
Paths are checked for traversal and symlink escapes. Use a volume or snapshot for data that must outlive the sandbox.

Example:

```
await sandbox.files.makeDirectory("/workspace/results");
await sandbox.files.writeText("/workspace/results/status.json", JSON.stringify({ ok: true }));
const status = await sandbox.files.readText("/workspace/results/status.json");
```
