core: files: 添加文件列表缓存

This commit is contained in:
undefined committed 2021-01-25 00:23:02 +08:00
1 parent 9e92891fb2
commit 3c4256be84
12 files changed
+64 -96

No files matched your search

+1 -1
View File
@@ -129,7 +129,7 @@ class StorageService {
return await this.client.removeObjects(this.opts.bucket, target);
}
async list(target: string, recursive = false) {
async list(target: string, recursive = true) {
const stream = this.client.listObjects(this.opts.bucket, target, recursive);
return await new Promise<BucketItem[]>((resolve, reject) => {
const results: BucketItem[] = [];