# FileSystemManager.writeFileSync(string filePath, string|ArrayBuffer data, string encoding)
The synchronous version of FileSystemManager.writeFile.
# Parameters
# string filePath
Path to the file into which you want to write data
# string|ArrayBuffer data
Text or binary data to be written
# string encoding
Specifies the character encoding of the written file
Valid values of encoding
| Value | Description | Minimum Version |
|---|---|---|
| ascii | ||
| base64 | ||
| binary | ||
| hex | ||
| ucs2 | Read in little endian | |
| ucs-2 | Read in little endian | |
| utf16le | Read in little endian | |
| utf-16le | Read in little endian | |
| utf-8 | ||
| utf8 | ||
| latin1 |
# Errors
| Error Code | Error Message | Description |
|---|---|---|
| fail no such file or directory, open ${filePath} | The directory where the specified filePath is located does not exist | |
| fail permission denied, open ${dirPath} | No write permission on the specified filePath |