ssCore.FileSys.appendToFileUTF8

Appends the data to the end of a unicode text file without overwriting existing data.


Availability:

First available in version 3.3 build 120.


Input Parameters:

path - A fully qualified path to a file. This parameter supports monikers.

writeBOM - [Optional] - If the file is being created, write the BOM (byte order marker) at the beginning of the file. Valid values include: true,false. Default value is true.

data - Data to be added to the end of the file.


Output Parameters:

No output parameters.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.FileSys.appendToFileUTF8( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.FileSys.appendToFileUTF8( paramsObject );


Notes:

The data will be added to the end of the file. You can use FileSys.writeToFileUTF8 to overwrite the contents of an existing file.

If the specified file does not exist it will be created. FileSys.appendToFileUTF8 will not create folders that are part of the path, so the target folder must exist (see FileSys.createDir).

                

Examples:

ssCore.FileSys.appendToFileUTF8({path:"startdir://file.txt", data:"Data added to a file.\r\n"});