Skip to main content
This section covers the sandbox local filesystem: the files and directories inside a running sandbox. Use it to:
  • Inspect paths and metadata.
  • Read and write text or bytes.
  • Move, copy, and remove files.
  • Watch for file system changes.
  • Upload, download, and generate presigned transfer URLs.
This section is about the sandbox’s local filesystem. Persistent volumes are a separate surface and are documented in Volumes.

Quick Start

await sandbox.files.writeText("/tmp/hello.txt", "hello from sandbox");

const text = await sandbox.files.readText("/tmp/hello.txt");
console.log(text);