Methods
Private _feed
- _feed(fid: string, busid: number): Promise<GfsFileStat>
df
- df(): Promise<{ free: number; total: number; used: number } & { file_count: number; max_file_count: number }>
Returns Promise<{ free: number; total: number; used: number } & { file_count: number; max_file_count: number }>
dir
Parameters
pid: string = "/"
start: number = 0
limit: number = 100
download
- download(fid: string): Promise<Omit<FileElem, "type"> & { url: string }>
Parameters
Returns Promise<Omit<FileElem, "type"> & { url: string }>
forward
Parameters
pid: string = "/"
Optional name: string
ls
Parameters
pid: string = "/"
start: number = 0
limit: number = 100
mv
- mv(fid: string, pid: string): Promise<void>
Parameters
Returns Promise<void>
rename
- rename(fid: string, name: string): Promise<void>
Parameters
Returns Promise<void>
rm
- rm(fid: string): Promise<void>
Parameters
Returns Promise<void>
upload
- upload(file: string | Uint8Array | Buffer, pid?: string, name?: string, callback?: (percentage: string) => void): Promise<GfsFileStat>
Parameters
file: string | Uint8Array | Buffer
pid: string = "/"
Optional name: string
Optional callback: (percentage: string) => void
- (percentage: string): void
群文件系统 fid表示一个文件或目录的id,pid表示它所在目录的id 根目录的id为"/" 只能在根目录下创建目录 删除一个目录会删除下面的全部文本