Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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:

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:

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, Testing