FileSystemManager.writeFile
Requires:
BaseKit≥2.4.3
Platforms:
iOSAndroid
Method signature
FileSystemManager.writeFile(params: )Description
Write to a file; requires file read/write permission
Parameters
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
filePath | string | Yes | - | The file path to write (local path) |
data | string | Yes | - | Text data to write, encoded according to encoding |
encoding | string | No | "utf8" | Specify the character encoding for writing the file; currently supports utf8/ascii/base64; defaults to utf8 |
complete | () => void | No | - | Completion callback (executed on both success and failure) |
success | () => void | No | - | Callback on successful API call |
fail | (params: Object) => void | No | - | Failure callback |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None