Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
283c00b0
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
5995
Star
90
Fork
162
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
18
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
18
Issue
18
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
283c00b0
编写于
5月 14, 2024
作者:
M
mahaifeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[file-manager]修改错误类型
上级
88ada333
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
74 addition
and
55 deletion
+74
-55
pages/API/get-file-system-manager/get-file-system-manager.uvue
.../API/get-file-system-manager/get-file-system-manager.uvue
+74
-55
未找到文件。
pages/API/get-file-system-manager/get-file-system-manager.uvue
浏览文件 @
283c00b0
...
@@ -164,12 +164,12 @@
...
@@ -164,12 +164,12 @@
this.statsRet = res.stats
this.statsRet = res.stats
console.log('this.statsRet', this.statsRet)
console.log('this.statsRet', this.statsRet)
},
},
fail: (res
: UniError
) => {
fail: (res
:IUniError
) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'statFileInfoTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'statFileInfoTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('statFileInfoTest fail', res)
console.log('statFileInfoTest fail', res)
this.lastFailError
= res
this.lastFailError
=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
console.log("statFileInfoTest complete", res)
console.log("statFileInfoTest complete", res)
...
@@ -195,12 +195,12 @@
...
@@ -195,12 +195,12 @@
this.getFileInfoSize = res.size
this.getFileInfoSize = res.size
this.getFileInfoDigest = res.digest
this.getFileInfoDigest = res.digest
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'getFileInfoTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'getFileInfoTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError
= res
this.lastFailError
=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
console.log("complete", res)
console.log("complete", res)
...
@@ -224,12 +224,12 @@
...
@@ -224,12 +224,12 @@
}
}
console.log('success', res)
console.log('success', res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'copyFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'copyFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError
= res
this.lastFailError
=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
console.log("complete", res)
console.log("complete", res)
...
@@ -253,12 +253,12 @@
...
@@ -253,12 +253,12 @@
}
}
console.log('success', res)
console.log('success', res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'renameFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'renameFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError
= res
this.lastFailError
=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
this.done = true
this.done = true
...
@@ -281,12 +281,12 @@
...
@@ -281,12 +281,12 @@
console.log("success", res)
console.log("success", res)
this.fileListSuccess = res.files
this.fileListSuccess = res.files
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'readDirTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'readDirTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError
= res
this.lastFailError
=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
console.log("complete", res)
console.log("complete", res)
...
@@ -313,12 +313,12 @@
...
@@ -313,12 +313,12 @@
}
}
console.log('success', res)
console.log('success', res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'writeFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'writeFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail')
console.log('fail')
this.lastFailError
= res
this.lastFailError
=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
this.done = true
this.done = true
...
@@ -344,12 +344,12 @@
...
@@ -344,12 +344,12 @@
console.log('success', res)
console.log('success', res)
this.readFileRet = res.data
this.readFileRet = res.data
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'readFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'readFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError
= res
this.lastFailError
=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
console.log("complete", res)
console.log("complete", res)
...
@@ -372,12 +372,12 @@
...
@@ -372,12 +372,12 @@
}
}
console.log('success', res)
console.log('success', res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'rmdirTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'rmdirTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError
= res
this.lastFailError
=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
console.log("complete", res)
console.log("complete", res)
...
@@ -402,12 +402,13 @@
...
@@ -402,12 +402,13 @@
}
}
console.log('success', res)
console.log('success', res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'mkdirTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'mkdirTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
if (res instanceof UniError) {
if (res instanceof UniError) {
...
@@ -431,12 +432,13 @@
...
@@ -431,12 +432,13 @@
console.log('success', res)
console.log('success', res)
this.accessFileRet = res.errMsg
this.accessFileRet = res.errMsg
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'accessFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'accessFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
if (res instanceof UniError) {
if (res instanceof UniError) {
...
@@ -459,12 +461,13 @@
...
@@ -459,12 +461,13 @@
}
}
console.log('success', res)
console.log('success', res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'unlinkTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'unlinkTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
if (res instanceof UniError) {
if (res instanceof UniError) {
...
@@ -497,12 +500,13 @@
...
@@ -497,12 +500,13 @@
}
}
console.log('success unlink', res)
console.log('success unlink', res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'unlinkAllFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'unlinkAllFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail unlink', res)
console.log('fail unlink', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
if (res instanceof UniError) {
if (res instanceof UniError) {
...
@@ -514,12 +518,13 @@
...
@@ -514,12 +518,13 @@
} as UnLinkOptions)
} as UnLinkOptions)
});
});
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'unlinkAllFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'unlinkAllFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail to readdir', res)
console.log('fail to readdir', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
console.log("complete readdir", res)
console.log("complete readdir", res)
...
@@ -544,12 +549,13 @@
...
@@ -544,12 +549,13 @@
}
}
console.log('success', res)
console.log('success', res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'copyFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'copyFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
console.log("complete", res)
console.log("complete", res)
...
@@ -573,12 +579,13 @@
...
@@ -573,12 +579,13 @@
}
}
console.log('success', res)
console.log('success', res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'appendFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'appendFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail')
console.log('fail')
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
this.done = true
this.done = true
...
@@ -757,12 +764,13 @@
...
@@ -757,12 +764,13 @@
this.saveFileRet = res.savedFilePath
this.saveFileRet = res.savedFilePath
this.done = true
this.done = true
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'saveFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'saveFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('saveFileTest fail', res)
console.log('saveFileTest fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
this.done = true
this.done = true
},
},
complete: (_) => {
complete: (_) => {
...
@@ -801,12 +809,13 @@
...
@@ -801,12 +809,13 @@
}
}
console.log('success', res)
console.log('success', res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'unzipFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'unzipFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (_) => {
complete: (_) => {
this.done = true
this.done = true
...
@@ -825,12 +834,13 @@
...
@@ -825,12 +834,13 @@
this.fileListSuccess = res.fileList
this.fileListSuccess = res.fileList
this.getSavedFileListRet = "getSavedFileList:ok"
this.getSavedFileListRet = "getSavedFileList:ok"
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'getSavedFileListTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'getSavedFileListTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('getSavedFileListTest fail', res)
console.log('getSavedFileListTest fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
this.getSavedFileListRet = JSON.stringify(res)
this.getSavedFileListRet = JSON.stringify(res)
},
},
complete: (res : any) => {
complete: (res : any) => {
...
@@ -855,12 +865,13 @@
...
@@ -855,12 +865,13 @@
}
}
console.log("success", res)
console.log("success", res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'truncateFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'truncateFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
console.log("complete", res)
console.log("complete", res)
...
@@ -894,12 +905,13 @@
...
@@ -894,12 +905,13 @@
}
}
console.log("success", res)
console.log("success", res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'readCompressedFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'readCompressedFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (_) => {
complete: (_) => {
this.done = true
this.done = true
...
@@ -937,7 +949,7 @@
...
@@ -937,7 +949,7 @@
this.removeSavedFileRet = res.errMsg
this.removeSavedFileRet = res.errMsg
console.log("removeSavedFileTest success", res)
console.log("removeSavedFileTest success", res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'removeSavedFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'removeSavedFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
...
@@ -981,12 +993,13 @@
...
@@ -981,12 +993,13 @@
console.log("success", res)
console.log("success", res)
this.fd = res.fd
this.fd = res.fd
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'openFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'openFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (_) => {
complete: (_) => {
this.done = true
this.done = true
...
@@ -1047,12 +1060,13 @@
...
@@ -1047,12 +1060,13 @@
this.closeFileRet = res.errMsg
this.closeFileRet = res.errMsg
console.log("success", res)
console.log("success", res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'closeTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'closeTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (_) => {
complete: (_) => {
this.done = true
this.done = true
...
@@ -1079,12 +1093,13 @@
...
@@ -1079,12 +1093,13 @@
console.log("success", res)
console.log("success", res)
this.bytesWritten = res.bytesWritten
this.bytesWritten = res.bytesWritten
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'writeTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'writeTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (_) => {
complete: (_) => {
this.done = true
this.done = true
...
@@ -1128,12 +1143,13 @@
...
@@ -1128,12 +1143,13 @@
this.done = true
this.done = true
}
}
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'openFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'openFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
this.done = true
this.done = true
}
}
} as OpenFileOptions)
} as OpenFileOptions)
...
@@ -1150,12 +1166,13 @@
...
@@ -1150,12 +1166,13 @@
console.log("success", res)
console.log("success", res)
this.fstat = res.stats
this.fstat = res.stats
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'fstatTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'fstatTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (_) => {
complete: (_) => {
this.done = true
this.done = true
...
@@ -1193,12 +1210,13 @@
...
@@ -1193,12 +1210,13 @@
}
}
this.ftruncateRet = res.errMsg
this.ftruncateRet = res.errMsg
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'ftruncateFileTest fail:' + JSON.stringify(res) + '\n\n'
this.log += 'ftruncateFileTest fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
},
},
complete: (res : any) => {
complete: (res : any) => {
console.log("complete", res)
console.log("complete", res)
...
@@ -1239,12 +1257,13 @@
...
@@ -1239,12 +1257,13 @@
}
}
console.log("success", res)
console.log("success", res)
},
},
fail: (res : UniError) => {
fail: (res :
I
UniError) => {
if (this.logAble) {
if (this.logAble) {
this.log += 'readZipEntry fail:' + JSON.stringify(res) + '\n\n'
this.log += 'readZipEntry fail:' + JSON.stringify(res) + '\n\n'
}
}
console.log('fail', res)
console.log('fail', res)
this.lastFailError = res
this.lastFailError=new UniError(res.errSubject, res.errCode, res.errMsg)
}
}
} as ReadZipEntryOptions)
} as ReadZipEntryOptions)
},
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录