test
This commit is contained in:
@@ -157,7 +157,7 @@ export class QueryResources {
|
||||
return { code: 200, message: '上传成功' };
|
||||
}
|
||||
|
||||
async getState(filepath: string, opts?: DataOpts): Promise<Result<Stat>> {
|
||||
async getStat(filepath: string, opts?: DataOpts): Promise<Result<Stat>> {
|
||||
const url = `${this.prefix}${filepath}`;
|
||||
return adapter({
|
||||
url,
|
||||
@@ -168,6 +168,15 @@ export class QueryResources {
|
||||
headers: this.header(opts?.headers),
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @deprecated use getStat instead
|
||||
* @param filepath
|
||||
* @param opts
|
||||
* @returns
|
||||
*/
|
||||
async getState(filepath: string, opts?: DataOpts): Promise<Result<Stat>> {
|
||||
return this.getStat(filepath, opts);
|
||||
}
|
||||
async createFolder(folderpath: string, opts?: DataOpts): Promise<Result<any>> {
|
||||
const filepath = folderpath.endsWith('/') ? `${folderpath}keep.txt` : `${folderpath}/keep.txt`;
|
||||
return this.uploadFile(filepath, '文件夹占位,其他文件不存在,文件夹不存在,如果有其他文件夹,删除当前文件夹占位文件即可', opts);
|
||||
|
||||
Reference in New Issue
Block a user