# FileSystemManager.saveFile(Object object)
with Promise style call: Supported
Mini Program plugin: Not supported
Save temporary files locally. This interface moves temporary files, so when the call is successful, tempFilePath Will not be available.
# parameter
# Object object
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
tempFilePath | string | yes | Temporary storage file path (Local path) | |
filePath | string | no | File path to store (Local path) | |
success | function | no | Interface calls the successful callback function | |
fail | function | no | Interface calls failed callback functions | |
complete | function | no | Callback function at the end of an interface call (both successful and unsuccessful calls are executed) |
# object.success callback
# parameter
# Object res
attribute | type | Introductions |
---|---|---|
savedFilePath | string | File path after storage (Local path) |
# object.fail callback
# parameter
# Object res
attribute | type | Introductions |
---|---|---|
errMsg | string | Error message |
res.errMsg Legal value
value | Introductions | Minimum version |
---|---|---|
fail tempFilePath file not exist | Specified tempFilePath Cannot find file | |
fail permission denied, open "${filePath}" | Specified filePath Path does not have write permissions | |
fail No such file or directory "${dirPath}" | There is no parent directory | |
fail the maximum size of the file storage limit is exceeded | Insufficient storage space | |
fail sdcard not mounted | Android sdcard Mount failure |