PlainApp
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 }
}