கோப்புகள்
அம்ச ஆதரவிற்கு app.capabilities-ஐயும் அனுமதிக்கு app.access மற்றும் host அனுமதிகளையும் சரிபார்க்கவும். எடுத்துக்காட்டுகள் செயற்கை மதிப்புகளைப் பயன்படுத்துகின்றன; அழைப்பதற்கு முன் பாதைகள், ID-கள், உள்ளீடுகள் மற்றும் வடிப்பான்களை மாற்றவும்.
வகை வரையறைகள்
type Subscription {
fileSearchResults(root: String!, query: String!, offset: Int!, limit: Int!, sortBy: FileSortBy!): FileSearchResults!
}
type Mutation {
cacheZipEntry(path: String!): String!
copyFileToDirectory(src: String!, directory: String!, name: String!): String!
createDir(path: String!): File!
createFile(path: String!): File!
createFileTask(type: FileTaskType!, title: String!, ops: [FileTaskOpInput!]!, waitForCompletion: Boolean! = false): FileTask!
createZipArchive(paths: [String!]!, target: String!): String!
deleteFiles(paths: [String!]!): ActionResult!
deleteTrashedFile(path: String!): Boolean!
extractZipArchive(path: String!, target: String!): String!
renameFile(path: String!, name: String!): String
restoreFiles(paths: [String!]!): ActionResult!
trashFiles(paths: [String!]!): ActionResult!
writeTextFile(path: String!, content: String!, overwrite: Boolean!): File!
}
type Query {
fileCount(root: String!, query: String!): Int!
fileInfo(path: String!): FileInfo
fileTasks(query: String!, offset: Int!, limit: Int!): [FileTask!]!
files(root: String!, query: String!, offset: Int!, limit: Int!, sortBy: FileSortBy!): [File!]!
recentFiles: [File!]!
trashedFileCount(query: String!): Int!
trashedFiles(query: String!, offset: Int!, limit: Int!, sortBy: TrashedFileSortBy!): [TrashedFile!]!
}
type ActionResult {
affectedCount: Int!
}
type AudioFileInfo {
durationMs: Long!
location: Location
}
type File {
permission: String!
mediaId: ID
name: String!
path: String!
createdAt: Instant
updatedAt: Instant!
size: Long!
isDir: Boolean!
childCount: Int!
url: String!
isSystem: Boolean!
}
type FileInfo {
path: String!
updatedAt: Instant!
size: Long!
data: MediaFileInfo
}
type FileSearchResults {
items: [File!]!
offset: Long!
count: Long!
complete: Boolean!
}
enum FileSortBy {
UPDATED_AT_ASC
UPDATED_AT_DESC
SIZE_ASC
SIZE_DESC
NAME_ASC
NAME_DESC
}
type FileTask {
id: ID!
clientId: ID!
type: FileTaskType!
title: String!
status: FileTaskStatus!
error: String!
totalBytes: Long!
doneBytes: Long!
totalItems: Long!
doneItems: Long!
createdAt: Instant!
updatedAt: Instant!
completedOps: [FileTaskCompletedOp!]!
}
type FileTaskCompletedOp {
src: String!
dst: String!
}
input FileTaskOpInput {
src: String!
dst: String!
overwrite: Boolean!
}
enum FileTaskStatus {
QUEUED
RUNNING
DONE
ERROR
}
enum FileTaskType {
COPY
MOVE
}
type ImageFileInfo {
make: String!
model: String!
rotation: Int!
colorSpace: String!
apertureValue: Float!
exposureTime: String!
focalLength: String!
isoSpeed: Int!
takenAt: Instant
flash: Int!
fNumber: Float!
exposureProgram: Int!
meteringMode: Int!
whiteBalance: Int!
creator: String!
resolutionX: Int!
resolutionY: Int!
description: String!
width: Int!
height: Int!
location: Location
}
scalar Instant
type Location {
latitude: Float!
longitude: Float!
}
scalar Long
union MediaFileInfo = ImageFileInfo | AudioFileInfo | VideoFileInfo
type TrashedFile {
id: ID!
type: TrashedFileType!
originalPath: String!
disk: String!
trashRelPath: String!
deletedAt: Instant!
uid: Int!
gid: Int!
mode: Int!
sizeBytes: Long
entryCount: Int
displayName: String!
trashedPath: String!
}
enum TrashedFileSortBy {
DATE_ASC
DATE_DESC
SIZE_ASC
SIZE_DESC
NAME_ASC
NAME_DESC
}
enum TrashedFileType {
FILE
DIR
}
type VideoFileInfo {
width: Int!
height: Int!
durationMs: Long!
rotation: Int!
displayWidth: Int!
displayHeight: Int!
bitrate: Long!
frameRate: Float!
title: String!
artist: String!
album: String!
genre: String!
takenAt: Instant
writer: String!
composer: String!
location: Location
}செயல்பாடுகள்
fileSearchResults
கொடுக்கப்பட்ட வேர், வடிப்பான், பக்கம் மற்றும் வரிசைக்கான கோப்புத் தேடல் முடிவு நிலைப்படங்களைப் பெறவும்.
subscription fileSearchResults($root: String!, $query: String!, $offset: Int!, $limit: Int!, $sortBy: FileSortBy!) {
fileSearchResults(root: $root, query: $query, offset: $offset, limit: $limit, sortBy: $sortBy) { offset count complete }
}cacheZipEntry
குறிப்பிட்ட ZIP பதிவைக் கேச்சில் பிரித்தெடுத்து அதன் பாதையைத் தரவும்.
mutation cacheZipEntry($path: String!) {
cacheZipEntry(path: $path)
}copyFileToDirectory
கொடுக்கப்பட்ட இலக்குப் பெயரில் கோப்பை அடைவிற்குள் நகலெடுத்து, கிடைத்தால் அதன் பாதையைத் தரவும்.
mutation copyFileToDirectory($src: String!, $directory: String!, $name: String!) {
copyFileToDirectory(src: $src, directory: $directory, name: $name)
}createDir
புதிய அடைவை உருவாக்கி File பொருளாகத் தரவும்.
mutation createDir($path: String!) {
createDir(path: $path) { permission mediaId name path createdAt updatedAt size isDir }
}createFile
கொடுக்கப்பட்ட பாதையில் வெற்றுக் கோப்பை உருவாக்கி அதன் மெட்டாடேட்டாவைத் தரவும்.
mutation createFile($path: String!) {
createFile(path: $path) { permission mediaId name path createdAt updatedAt size isDir }
}createFileTask
தொகுதி நகலெடுப்பு அல்லது நகர்த்தல் பணியை உருவாக்கவும்; விருப்பமாக முடியும் வரை காத்திருந்து அதன் நிலையைத் தரவும்.
mutation createFileTask($type: FileTaskType!, $title: String!, $ops: [FileTaskOpInput!]!, $waitForCompletion: Boolean!) {
createFileTask(type: $type, title: $title, ops: $ops, waitForCompletion: $waitForCompletion) { id clientId type title status error totalBytes doneBytes }
}createZipArchive
தேர்ந்தெடுத்த பாதைகளிலிருந்து இலக்குப் பாதையில் ZIP காப்பகத்தை உருவாக்கவும்.
mutation createZipArchive($paths: [String!]!, $target: String!) {
createZipArchive(paths: $paths, target: $target)
}deleteFiles
துல்லியமான பாதைகள் மூலம் ஒன்று அல்லது அதற்கு மேற்பட்ட கோப்புகள் அல்லது அடைவுகளை நீக்கவும்.
mutation deleteFiles($paths: [String!]!) {
deleteFiles(paths: $paths) { affectedCount }
}deleteTrashedFile
கோப்புக் குப்பையிலிருந்து ஓர் உருப்படியை நிரந்தரமாக நீக்கவும்.
mutation deleteTrashedFile($path: String!) {
deleteTrashedFile(path: $path)
}extractZipArchive
ZIP காப்பகத்தை இலக்கு அடைவிற்குள் பிரித்தெடுக்கவும்.
mutation extractZipArchive($path: String!, $target: String!) {
extractZipArchive(path: $path, target: $target)
}renameFile
கோப்பு அல்லது அடைவின் பெயரை மாற்றவும்.
mutation renameFile($path: String!, $name: String!) {
renameFile(path: $path, name: $name)
}restoreFiles
குறிப்பிட்ட குப்பைக் கோப்புப் பாதைகளை மீட்டெடுத்து பாதிக்கப்பட்ட எண்ணிக்கையைத் தெரிவிக்கவும்.
mutation restoreFiles($paths: [String!]!) {
restoreFiles(paths: $paths) { affectedCount }
}trashFiles
குறிப்பிட்ட கோப்புப் பாதைகளைக் குப்பைக்கு நகர்த்தி பாதிக்கப்பட்ட எண்ணிக்கையைத் தெரிவிக்கவும்.
mutation trashFiles($paths: [String!]!) {
trashFiles(paths: $paths) { affectedCount }
}writeTextFile
கோரப்பட்ட மேலெழுதும் கொள்கையுடன் கொடுக்கப்பட்ட கோப்புப் பாதையில் உரையை எழுதவும்.
mutation writeTextFile($path: String!, $content: String!, $overwrite: Boolean!) {
writeTextFile(path: $path, content: $content, overwrite: $overwrite) { permission mediaId name path createdAt updatedAt size isDir }
}fileCount
பக்கப் பிரிவைத் தவிர்த்து, குறிப்பிட்ட வேரின் கீழ் கோப்புத் தேடலில் பொருந்துவனவற்றை எண்ணவும்.
# Total matches for the same query, ignoring paging.
query fileCount($root: String!, $query: String!) {
fileCount(root: $root, query: $query)
}fileInfo
ஒரு பாதையின் கோப்புப் பண்புகள், ஆதரிக்கப்படும் ஊடக மெட்டாடேட்டா மற்றும் குறிச்சொல் தகவலைப் படிக்கவும்.
query fileInfo($path: String!) {
fileInfo(path: $path) { path updatedAt size }
}fileTasks
வினவலுக்குப் பொருந்தும் கோப்புச் செயல்பாட்டுப் பணிகளின் ஒரு பக்கத்தைப் படிக்கவும்.
query fileTasks($query: String!, $offset: Int!, $limit: Int!) {
fileTasks(query: $query, offset: $offset, limit: $limit) { id clientId type title status error totalBytes doneBytes }
}files
வேர் பாதையின் கீழ் கோப்புகளைப் பக்கங்களாகப் பட்டியலிட்டுத் தேடவும். அனைத்தையும் பட்டியலிட வெற்று query வழங்கவும்.
# One page of a directory listing, filtered and sorted by the search
# DSL. `query` may carry a `parent` field to redirect the root, which
# is what the file manager's breadcrumb links send.
query files($root: String!, $query: String!, $offset: Int!, $limit: Int!, $sortBy: FileSortBy!) {
files(root: $root, query: $query, offset: $offset, limit: $limit, sortBy: $sortBy) { permission mediaId name path createdAt updatedAt size isDir }
}recentFiles
அண்மையில் திறந்த கோப்புகளைப் பட்டியலிடவும்.
# Recently-opened files. Reading them is a storage read, so this one
# gates — plain-app's `recentFiles` calls `checkEnabledAsync`.
query recentFiles {
recentFiles { permission mediaId name path createdAt updatedAt size isDir }
}trashedFileCount
கோப்புக் குப்பையிலுள்ள உருப்படிகளை எண்ணவும்.
query trashedFileCount($query: String!) {
trashedFileCount(query: $query)
}trashedFiles
குப்பைக் கோப்புகளைப் பக்கப் பிரிவு மற்றும் வரிசைப்படுத்தலுடன் தேடவும்.
query trashedFiles($query: String!, $offset: Int!, $limit: Int!, $sortBy: TrashedFileSortBy!) {
trashedFiles(query: $query, offset: $offset, limit: $limit, sortBy: $sortBy) { id type originalPath disk trashRelPath deletedAt uid gid }
}