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
பதிவுசெய்யப்பட்ட சேமிப்பக mount-இன் காட்சி மாற்றுப்பெயரை அமைக்கவும்.
graphql
mutation setMountAlias($id: ID!, $alias: String!) {
setMountAlias(id: $id, alias: $alias)
}query
disks
வட்டுகளையும் அவற்றின் பகிர்வு மற்றும் mount தகவலையும் பட்டியலிடவும்.
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 }
}