API リファレンス

ディスク

ストレージボリューム、ディスクのフォーマット、マウントの別名。

型定義

graphql
type Mutation {
  formatDisk(path: String!): Boolean!
  setMountAlias(id: ID!, alias: String!): Boolean!
}

type Query {
  disks: [Disk!]!
  mounts: [Mount!]!
}

type Disk {
	id: ID!
	name: String!
	path: String!
	sizeBytes: Long!
	removable: Boolean!
	model: String
}

enum DriveType {
	INTERNAL_STORAGE
	SDCARD
	USB_STORAGE
	APP
}

scalar Long

type Mount {
	id: ID!
	name: String!
	path: String!
	mountPoint: String!
	fsType: String!
	totalBytes: Long!
	usedBytes: Long!
	freeBytes: Long!
	remote: Boolean!
	alias: String!
	driveType: DriveType!
	diskId: String!
	label: String!
	diskModel: String!
}

操作

mutation

formatDisk

指定したディスクをフォーマットします。デバイスのストレージ権限を必要とする破壊的操作です。

graphql
mutation formatDisk($path: String!) {
  formatDisk(path: $path)
}
mutation

setMountAlias

登録されたストレージマウントの表示エイリアスを設定します。

graphql
mutation setMountAlias($id: ID!, $alias: String!) {
  setMountAlias(id: $id, alias: $alias)
}
query

disks

ディスクと、そのパーティションおよびマウント情報を一覧表示します。

graphql
query disks {
  disks { id name path sizeBytes removable model }
}
query

mounts

利用可能なすべてのストレージボリューム(内部、SD カード、USB)を一覧表示します。

graphql
query mounts {
  mounts { id name path mountPoint fsType totalBytes usedBytes freeBytes }
}