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

# Retrieve files from your Sandbox instance

> Retrieve text or binary files from the sandbox filesystem as standard web Response objects.

The `getFile()` method retrieves a file from your sandbox’s filesystem and returns it as a standard **Web Response object**, allowing you to handle the data in multiple formats: text, JSON, binary, or Blob. All file paths must start with the absolute path `/home/damner` to ensure access is confined to the sandbox’s isolated workspace.

### `getFile(path)`

**Description:**
Retrieves a file from the sandbox filesystem. Returns a standard Response object that you can read as text, binary, blob, etc.

**Parameters:**

| Parameter | Type   | Required | Description                                |
| --------- | ------ | -------- | ------------------------------------------ |
| path      | string | Yes      | File path (must start with `/home/damner`) |

**Returns:**
`Promise<Response>` - Standard fetch Response object with methods:

* `.text()` - Read as string
* `.arrayBuffer()` - Read as binary
* `.blob()` - Read as Blob
* `.json()` - Parse as JSON

**Example:**

```typescript theme={null}
// Read text file
const response = await sandbox.getFile('/home/damner/script.js')
const content = await response.text()
console.log(content)
```
