Skip to content

FileSystemManager.writeFile ​

JS
    FileSystemManager.writeFile(Object object)

Write a file

Parameters

  • Object object: Input parameters; see the table below for details

Properties of object:

PropertyTypeDefaultRequiredDescription
filePathstringYesPath of the file to write to
datastring/ArrayBufferYesText or binary data to write
encodingstringutf8NoCharacter encoding used to write the file; see the table below for valid values
successfunctionNoCallback function when the call succeeds
failfunctionNoCallback function when the call fails; called when the specified directory does not exist
completefunctionNoCallback function when the call completes

Valid values of encoding

ValueDescription
utf8utf-8 character encoding
utf-8utf-8 character encoding
binarybinary