# Read and write files
<subtitle>Read and write files in a sandboxed file system. </subtitle>

## Read file

You can use the `files.read()` method to read files from a sandbox file system.

```python
from ucloud_sandbox import Sandbox

sandbox = Sandbox.create()
file_content = sandbox.files.read('/path/to/file')
```

## Write to a single file

You can use the `files.write()` method to write a single file to a sandboxed file system.

```python
from ucloud_sandbox import Sandbox

sandbox = Sandbox.create()

sandbox.files.write('/path/to/file', 'file content')
```

##Write multiple files

You can also write multiple files to the sandbox at once.

```python
from ucloud_sandbox import Sandbox

sandbox = Sandbox.create()

sandbox.files.write_files([
    { "path": "/path/to/a", "data": "file content" },
    { "path": "another/path/to/b", "data": "file content" }
])
```
