codecamp

FileSystemManager.saveFile

FileSystemManager.saveFile(Object object)

保存临时文件到本地。此接口会移动临时文件,因此调用成功后,tempFilePath 将不可用。本地文件存储上限:50M。


输入

继承标准对象输入,扩展属性描述:

属性类型默认值是否必填说明
tempFilePathstring临时存储文件路径
filePathstring要存储的文件路径


输出

success 回调函数参数 Object

属性类型说明
savedFilePathstring存储后的文件路径

fail 回调函数参数 Object

属性类型说明
errMsgstring错误信息
说明
fail tempFilePath file not exist指定的 tempFilePath 找不到文件
fail permission denied, open "${filePath}"指定的 filePath 路径没有写权限
fail no such file or directory "${dirPath}"上级目录不存在


FileSystemManager.rmdirSync
FileSystemManager.saveFileSync
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定