Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
0div committed Dec 12, 2024
1 parent a520b2f commit 38f7c8b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions apps/web/src/app/(docs)/docs/filesystem/read-write/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Reading files

You can read files from the sandbox filesystem using the `files.reado()` method.
You can read files from the sandbox filesystem using the `files.read()` method.

<CodeGroup>
```js
Expand All @@ -26,12 +26,18 @@ You can write files to the sandbox filesystem using the `files.write()` method.
```js
import { Sandbox } from '@e2b/code-interpreter'
const sandbox = await Sandbox.create()
await sandbox.files.write('/path/to/file', 'file content')
await sandbox.files.write([
{ path: "/path/to/a", data: "file content" },
{ path: "/another/path/to/b", data: "file content" }
])
```
```python
from e2b_code_interpreter import Sandbox

sandbox = Sandbox()
await sandbox.files.write('/path/to/file', 'file content')
await sandbox.files.write([
{ "path": "/path/to/a", "data": "file content" },
{ "path": "another/path/to/b", "data": "file content" }
])
```
</CodeGroup>

0 comments on commit 38f7c8b

Please sign in to comment.