API-Referenz

Datenträger

Speichervolumes, Datenträgerformatierung und Einhänge-Aliasse.

Typdefinitionen

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

Operationen

mutation

formatDisk

Formatiert den angegebenen Datenträger. Dieser destruktive Vorgang erfordert die Speicherberechtigungen des Geräts.

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

setMountAlias

Legt den Anzeigenamen eines registrierten Speichermounts fest.

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

disks

Listet Datenträger sowie deren Partitionen und Mounts auf.

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

mounts

Listet alle verfügbaren Speichervolumes auf, einschließlich internem Speicher, SD-Karte und USB.

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