ReferenceSDKClient
disks
SDK reference for disks —
listDisks
List platform-managed shared Archil disks declared in DSL for a deployment
GET
Usage:
const result = await swirls.client.disks.listDisks({
projectId: '...',
deploymentId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
deploymentId | string | Yes |
listDirectory
List files and directories on a managed disk via Archil exec
GET
Usage:
const result = await swirls.client.disks.listDirectory({
projectId: '...',
deploymentId: '...',
diskId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
deploymentId | string | Yes | |
diskId | string | Yes | |
path | string | No |
Output:
| Field | Type | Description |
|---|---|---|
path | string | |
entries | object[] |
listTree
Recursively list files and directories on a managed disk (capped)
GET
Usage:
const result = await swirls.client.disks.listTree({
projectId: '...',
deploymentId: '...',
diskId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
deploymentId | string | Yes | |
diskId | string | Yes | |
path | string | No |
Output:
| Field | Type | Description |
|---|---|---|
path | string | |
entries | object[] | |
truncated | boolean |
readFile
Read a single file from a managed disk (size-capped; rejects larger files)
GET
Usage:
const result = await swirls.client.disks.readFile({
projectId: '...',
deploymentId: '...',
diskId: '...',
path: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
deploymentId | string | Yes | |
diskId | string | Yes | |
path | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
path | string | |
size | number | |
content | string | |
truncated | boolean |
browseDirectory
List one directory on an exposed shared disk for Surface apps
GET
Usage:
const result = await swirls.client.disks.browseDirectory({
projectId: '...',
diskName: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
appName | string | No | |
diskName | string | Yes | |
path | string | No |
Output:
| Field | Type | Description |
|---|---|---|
path | string | |
entries | object[] |
browseTree
Recursively list files on an exposed shared disk for Surface apps
GET
Usage:
const result = await swirls.client.disks.browseTree({
projectId: '...',
diskName: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
appName | string | No | |
diskName | string | Yes | |
path | string | No |
Output:
| Field | Type | Description |
|---|---|---|
path | string | |
entries | object[] | |
truncated | boolean |
browseFile
Read a single file from an exposed shared disk for Surface apps
GET
Usage:
const result = await swirls.client.disks.browseFile({
projectId: '...',
diskName: '...',
path: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
appName | string | No | |
diskName | string | Yes | |
path | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
path | string | |
size | number | |
content | string | |
truncated | boolean |