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