---
title: Files
url: /sdks/go/0.1.8/api/files/
docset: sdk-go
version: 0.1.8
latest_version: 0.1.8
source: ai-openshell/sdk-go@v0.1.8:docs/src/api/files.md
---

> Documentation index: /sdks/go/0.1.8/llms.txt. This page is for Go SDK 0.1.8.

# Files

Accessor: `client.Files()`

`FileInterface` reserves the upload and download API while keeping sandbox lookup
and SSH-session lifecycle behavior stable. The standalone SDK does not currently
ship an SSH file-transfer transport, so both operations return
`v1.ErrTransportNotAvailable` before performing local validation or gateway RPCs.

## Upload

Detect transport availability programmatically:

```go
err := client.Files().Upload(ctx, "default", "sandbox-123", "./data/config.yaml", "/app/config.yaml")
if errors.Is(err, v1.ErrTransportNotAvailable) {
    // Use another transfer mechanism until an SSH transport is available.
} else if err != nil {
    log.Fatal(err)
}
```

## Download

`Download` has the same capability gate:

```go
err := client.Files().Download(ctx, "default", "sandbox-123", "/app/output.log", "./output.log")
if errors.Is(err, v1.ErrTransportNotAvailable) {
    // Use another transfer mechanism until an SSH transport is available.
} else if err != nil {
    log.Fatal(err)
}
```

See also: [Error Handling](/sdks/go/0.1.8/error-handling/), [Testing](/sdks/go/0.1.8/testing/)
