SWIRLS_
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:

ParameterTypeRequiredDescription
projectIdstringYes
deploymentIdstringYes

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:

ParameterTypeRequiredDescription
projectIdstringYes
deploymentIdstringYes
diskIdstringYes
pathstringNo

Output:

FieldTypeDescription
pathstring
entriesobject[]

listTree

Recursively list files and directories on a managed disk (capped)

GET

Usage:

const result = await swirls.client.disks.listTree({
  projectId: '...',
  deploymentId: '...',
  diskId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
deploymentIdstringYes
diskIdstringYes
pathstringNo

Output:

FieldTypeDescription
pathstring
entriesobject[]
truncatedboolean

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:

ParameterTypeRequiredDescription
projectIdstringYes
deploymentIdstringYes
diskIdstringYes
pathstringYes

Output:

FieldTypeDescription
pathstring
sizenumber
contentstring
truncatedboolean

browseDirectory

List one directory on an exposed shared disk for Surface apps

GET

Usage:

const result = await swirls.client.disks.browseDirectory({
  projectId: '...',
  diskName: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
appNamestringNo
diskNamestringYes
pathstringNo

Output:

FieldTypeDescription
pathstring
entriesobject[]

browseTree

Recursively list files on an exposed shared disk for Surface apps

GET

Usage:

const result = await swirls.client.disks.browseTree({
  projectId: '...',
  diskName: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
appNamestringNo
diskNamestringYes
pathstringNo

Output:

FieldTypeDescription
pathstring
entriesobject[]
truncatedboolean

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:

ParameterTypeRequiredDescription
projectIdstringYes
appNamestringNo
diskNamestringYes
pathstringYes

Output:

FieldTypeDescription
pathstring
sizenumber
contentstring
truncatedboolean

On this page