Skip to content

FileSystemManager.appendFileSync ​

JS
    FileSystemManager.appendFileSync(
        string filePath,
        string | ArrayBuffer data,
        string encoding)

Appends content to the end of a file

The synchronous version of FileSystemManager.appendFile

Parameters

  • string filePath: Path of the file to append content to

  • string|ArrayBuffer data: Text or binary data to append

  • string encoding: Specifies the character encoding for writing the file. See the figure below for valid values.

Valid values of encoding

ValueDescription
utf8utf-8 encoding
utf-8utf-8 encoding
binaryBinary

Parameters for caught exceptions

  • string error: Returns error information. See the figure below for valid values.

Valid values of error:

Error InformationDescription
no such file or directoryThe specified filePath file does not exist, or is a directory
permission deniedNo write permission for the specified target file path