FileSystemManager.writeFileSync
JS
FileSystemManager.writeFileSync(
string filePath,
string | ArrayBuffer data,
string encoding)Write a file
The synchronous version of FileSystemManager.writeFile
Parameters
string filePath: Path of the file to append content to
string|ArrayBuffer data: Text or binary data to append
string encoding: Character encoding used to write the file; see the table below for valid values
Valid values of encoding
| Value | Description |
|---|---|
| utf8 | utf-8 character encoding |
| utf-8 | utf-8 character encoding |
| binary | binary |
Parameters of the captured exception
- string error: Returns the error message; see the table below for valid values
Valid values of error:
| Error message | Description |
|---|---|
| no such file or directory | The specified filePath does not exist, or is a directory |
| permission denied | No write permission for the specified target file path |
