FileSystemManager.saveFile(Object object)
Saves temporary files to the local device. This API moves temporary files, so tempFilePath will not be available after the API is successfully called.
Parameters
Object object
| Attribute | Type | Default | Required | Description |
| tempFilePath | string | | Yes | Path to the temporarily stored files |
| filePath | string | | No | Path to save the files |
| success | function | | No | The callback function for a successful API call |
| fail | function | | No | Callback function for failed API call |
| complete | function | | No | Callback function used when API call completed (always executed whether call succeeds or fails) |
object.success callback function
Parameters
Object res
| Property | Type | Description |
| savedFilePath | number | Path to the saved file |
object.fail callback function
Parameters
Object res
| Property | Type | Description |
| errMsg | string | Error message |
Valid values of res.errMsg
| Value | Description | Minimum Version |
| fail tempFilePath file not exist | No file found with the specified tempFilePath | |
| fail permission denied, open "${filePath}" | No write permission on the specified filePath | |
| fail no such file or directory "${dirPath}" | The upper-layer directory does not exist | |