> ## Documentation Index
> Fetch the complete documentation index at: https://hyperbrowser.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Read and Write Mounted Volume Data

> Work with volume files through mounted paths

Once a volume is mounted, use the standard sandbox filesystem APIs against the mount path.

## Read and Write

<CodeGroup>
  ```typescript Node.js theme={null}
  const sandbox = await client.sandboxes.get("sandbox-id");

  await sandbox.files.writeText("/mnt/workspace/notes.txt", "persisted data");
  const text = await sandbox.files.readText("/mnt/workspace/notes.txt");

  console.log(text);
  ```

  ```python Python theme={null}
  sandbox = client.sandboxes.get("sandbox-id")

  sandbox.files.write_text("/mnt/workspace/notes.txt", "persisted data")
  text = sandbox.files.read_text("/mnt/workspace/notes.txt")

  print(text)
  ```

  ```bash CLI theme={null}
  hx file write <sandbox-id> /mnt/workspace/notes.txt --data 'persisted data'
  hx file cat <sandbox-id> /mnt/workspace/notes.txt
  ```
</CodeGroup>

## List and Inspect

<CodeGroup>
  ```typescript Node.js theme={null}
  const entries = await sandbox.files.list("/mnt/workspace", { depth: 1 });
  const info = await sandbox.files.getInfo("/mnt/workspace/notes.txt");

  console.log(entries.map((entry) => entry.path));
  console.log(info.size, info.permissions);
  ```

  ```python Python theme={null}
  entries = sandbox.files.list("/mnt/workspace", depth=1)
  info = sandbox.files.get_info("/mnt/workspace/notes.txt")

  print([entry.path for entry in entries])
  print(info.size, info.permissions)
  ```

  ```bash CLI theme={null}
  hx file ls <sandbox-id> /mnt/workspace --depth 1
  hx file stat <sandbox-id> /mnt/workspace/notes.txt
  ```
</CodeGroup>

## Upload and Download

You can also use standard filesystem transfer operations against mounted paths.

```bash theme={null}
# Upload local file into mounted volume path
hx cp ./local.txt <sandbox-id>:/mnt/workspace/local.txt

# Download from mounted volume path
hx cp <sandbox-id>:/mnt/workspace/local.txt ./downloaded.txt
```

## Access Mode

* `rw` mounts allow writes.
* `ro` mounts reject write operations.
