Files
கோப்புகள் மற்றும் கோப்பகங்களை உலாவு மற்றும் நிர்வகிக்கவும். மல்டி-மவுண்ட் சேமிப்பகத்தை (internal, SD card, USB) ஆதரிக்கிறது.
வகை வரையறைகள்
type File {
name: String!
path: String!
permission: String! # "rw" | "r"
createdAt: String # ISO 8601, null on some filesystems
updatedAt: String! # ISO 8601
size: Long! # 0 for directories
isDir: Boolean!
children: Int! # 0 for files; child count for directories
mediaId: String! # media store ID, empty when unavailable
}
type StorageMount {
id: String!
name: String!
path: String!
mountPoint: String!
fsType: String!
totalBytes: Long!
usedBytes: Long!
freeBytes: Long!
remote: Boolean!
alias: String!
}
type FileInfo {
path: String!
updatedAt: String!
size: Long!
tags: [Tag!]!
data: MediaFileInfo # image/video/audio metadata, null for other types
}
type MediaFileInfo {
# Union-like structure; fields vary by media type (image / video / audio)
width: Int
height: Int
duration: Int # milliseconds (video / audio)
artist: String
album: String
title: String
}
type FavoriteFolder {
rootPath: String!
fullPath: String!
alias: String # optional display alias, empty when not set
}செயல்பாடுகள்
mounts
கிடைக்கக்கூடிய அனைத்து சேமிப்பக தொகுதிகளையும் (internal, SD card, USB) பட்டியலிடவும்.
query GetMounts {
mounts {
id name path mountPoint fsType totalBytes usedBytes freeBytes remote alias
}
}recentFiles
அனைத்து சேமிப்பகத்திலும் சமீபத்தில் மாற்றப்பட்ட கோப்புகளை பட்டியலிடவும். Files UI-இல் "Recent" காட்சியின் மூலம்.
query GetRecentFiles {
recentFiles {
name path permission createdAt updatedAt size isDir children mediaId
}
}files
பக்கமிடலுடன் ஒரு root பாதையின் கீழ் கோப்புகளை பட்டியலிட்டு தேடவும். அனைத்தையும் பட்டியலிட வெற்று query-யை அனுப்பவும்.
query GetFiles($root: String!, $offset: Int!, $limit: Int!, $query: String!, $sortBy: FileSortBy!) {
files(root: $root, offset: $offset, limit: $limit, query: $query, sortBy: $sortBy) {
name path permission createdAt updatedAt size isDir children mediaId
}
}fileInfo
ஒரு கோப்பிற்கான stat + மீடியா மெட்டாடேட்டா + டேக்களைப் பெறவும். சர்வர் image/video/audio-ஐ கண்டறிந்து width, height, duration, போன்றவற்றை ஏற்ற fileName-ஐ அனுப்பவும்.
query GetFileInfo($id: ID!, $path: String!, $fileName: String!) {
fileInfo(id: $id, path: $path, fileName: $fileName) {
path updatedAt size
tags { id name }
data { width height duration artist album title }
}
}fileIds
கோப்புமுறைமை பாதைகளின் பட்டியலை அவற்றின் media-store IDs-ஆக தீர்க்கவும் (அகரவரிசைப்படுத்தப்படாத போது வெற்று சரம்).
query GetFileIds($paths: [String!]!) {
fileIds(paths: $paths)
}uploadedChunks
மீட்டெடுக்கக்கூடிய சங்கிலி அப்லோடுக்கு ஏற்கனவே பெறப்பட்ட சங்கிலி அட்டவணைகளை பட்டியலிடவும். குறைக்கப்பட்ட அப்லோடுகளை மீண்டும் தொடங்கப் பயன்படுகிறது.
query GetUploadedChunks($fileId: String!) {
uploadedChunks(fileId: $fileId)
}createDir
ஒரு புதிய கோப்பகத்தை உருவாக்கி அதை ஒரு File பொருளாக திருப்பி அனுப்பவும்.
mutation CreateDir($path: String!) {
createDir(path: $path) {
name path permission createdAt updatedAt size isDir children mediaId
}
}renameFile
ஒரு கோப்பு அல்லது கோப்பகத்தின் பெயரை மாற்றவும்.
mutation RenameFile($path: String!, $name: String!) {
renameFile(path: $path, name: $name)
}writeTextFile
ஒரு கோப்பிற்கு உரை உள்ளடக்கத்தை எழுதவும். கோப்பு ஏற்கனவே இருக்கும்போது "(1)" பின்னொட்டைச் சேர்க்க overwrite=false அமைக்கவும்.
mutation WriteTextFile($path: String!, $content: String!, $overwrite: Boolean!) {
writeTextFile(path: $path, content: $content, overwrite: $overwrite) {
name path size updatedAt
}
}deleteFiles
சரியான பாதை மூலம் ஒன்று அல்லது அதற்கு மேற்பட்ட கோப்புகள் அல்லது கோப்பகங்களை நீக்கவும்.
mutation DeleteFiles($paths: [String!]!) {
deleteFiles(paths: $paths)
}copyFile
ஒரு கோப்பு அல்லது கோப்பகத்தை இலக்கு பாதைக்கு நகலெடுக்கவும். ஏற்கனவே உள்ள கோப்பை மாற்ற overwrite-ஐ அமைக்கவும்.
mutation CopyFile($src: String!, $dst: String!, $overwrite: Boolean!) {
copyFile(src: $src, dst: $dst, overwrite: $overwrite)
}moveFile
ஒரு கோப்பு அல்லது கோப்பகத்தை இலக்கு பாதைக்கு நகர்த்தவும். ஏற்கனவே உள்ள கோப்பை மாற்ற overwrite-ஐ அமைக்கவும்.
mutation MoveFile($src: String!, $dst: String!, $overwrite: Boolean!) {
moveFile(src: $src, dst: $dst, overwrite: $overwrite)
}addFavoriteFolder
விரைவு அணுகலுக்காக ஒரு கோப்புறையை புக்மார்க் செய்யவும். அனைத்து புக்மார்க் செய்யப்பட்ட கோப்புறைகளின் புதுப்பிக்கப்பட்ட பட்டியலை திருப்பி அனுப்புகிறது.
mutation AddFavoriteFolder($rootPath: String!, $fullPath: String!) {
addFavoriteFolder(rootPath: $rootPath, fullPath: $fullPath) {
rootPath fullPath alias
}
}removeFavoriteFolder
ஒரு புக்மார்க் செய்யப்பட்ட கோப்புறையை அகற்றவும். மீதமுள்ள கோப்புறைகளின் புதுப்பிக்கப்பட்ட பட்டியலை திருப்பி அனுப்புகிறது.
mutation RemoveFavoriteFolder($fullPath: String!) {
removeFavoriteFolder(fullPath: $fullPath) {
rootPath fullPath alias
}
}setFavoriteFolderAlias
புக்மார்க் செய்யப்பட்ட கோப்புறைக்கு காட்டப்படும் புனைப்பெயரை அமைக்கவும் அல்லது புதுப்பிக்கவும். புனைப்பெயரை அழிக்க வெற்று சரத்தை அனுப்பவும்.
mutation SetFavoriteFolderAlias($fullPath: String!, $alias: String!) {
setFavoriteFolderAlias(fullPath: $fullPath, alias: $alias) {
rootPath fullPath alias
}
}deleteChunks
சங்கிலி அப்லோடு fileId-க்கான அனைத்து சேமிக்கப்பட்ட சங்கிலிகளையும் நீக்கவும். ரத்துசெய்யப்பட்ட அல்லது தோல்வியடைந்த அப்லோடுக்குப் பிறகு டிஸ்க் இடத்தை விடுவிக்கப் பயன்படுகிறது.
mutation DeleteChunks($fileId: String!) {
deleteChunks(fileId: $fileId)
}mergeChunks
முன்பு அப்லோட் செய்யப்பட்ட சங்கிலிகளை இறுதி கோப்பில் ஒன்றிணைக்கவும். PlainApp-இன் content-addressable AppFile store-இல் முடிவை இறக்குமதி செய்ய isAppFile=true அனுப்பவும் (அரட்டை இணைப்புகளால் பயன்படுத்தப்படுகிறது).
mutation MergeChunks($fileId: String!, $totalChunks: Int!, $path: String!, $replace: Boolean!, $isAppFile: Boolean!) {
mergeChunks(fileId: $fileId, totalChunks: $totalChunks, path: $path, replace: $replace, isAppFile: $isAppFile)
}