# string FileSystemManager.saveFileSync(string tempFilePath, string filePath)
以 [Promise 风格]((app-service/api#异步 -API- 返回-Promise)) 调用:不支持
小程序插件:不支持
相关文档: 文件系统
# 功能描述
FileSystemManager.saveFile 的同步版本
# 参数
# string tempFilePath
临时存储文件路径 (本地路径)
# string filePath
要存储的文件路径 (本地路径)
# 返回值
# string savedFilePath
存储后的文件路径 (本地路径)
# 错误
错误码 | 错误信息 | 说明 |
---|---|---|
fail tempFilePath file not exist | 指定的 tempFilePath 找不到文件 | |
fail permission denied, open "${filePath}" | 指定的 filePath 路径没有写权限 | |
fail no such file or directory "${dirPath}" | 上级目录不存在 | |
fail the maximum size of the file storage limit is exceeded | 存储空间不足 | |
fail sdcard not mounted | Android sdcard 挂载失败 |