Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Maintenance May 12, 8–9 PM PDT (May 13, 03:00–04:00 UTC). ~1 min disruption to sandbox management may occur. Already running sandboxes will not be affected. Questions? Contact us
files.read()
import { Sandbox } from 'e2b' const sandbox = await Sandbox.create() const fileContent = await sandbox.files.read('/path/to/file')
files.write()
import { Sandbox } from 'e2b' const sandbox = await Sandbox.create() await sandbox.files.write('/path/to/file', 'file content')
import { Sandbox } from 'e2b' const sandbox = await Sandbox.create() await sandbox.files.write([ { path: '/path/to/a', data: 'file content' }, { path: '/another/path/to/b', data: 'file content' } ])
Was this page helpful?