FileSystemManager.writeFile
JS
FileSystemManager.writeFile(Object object)Write a file
Parameters
- Object object: Input parameters; see the table below for details
Properties of object:
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| filePath | string | Yes | Path of the file to write to | |
| data | string/ArrayBuffer | Yes | Text or binary data to write | |
| encoding | string | utf8 | No | Character encoding used to write the file; see the table below for valid values |
| success | function | No | Callback function when the call succeeds | |
| fail | function | No | Callback function when the call fails; called when the specified directory does not exist | |
| complete | function | No | Callback function when the call completes |
Valid values of encoding
| Value | Description |
|---|---|
| utf8 | utf-8 character encoding |
| utf-8 | utf-8 character encoding |
| binary | binary |
