FileAppend

Appends new contents to a file starting at the last character in the file

Method Signature

FileAppend(file=[any], data=[any], charset=[string])

Arguments

Argument
Type
Required
Description
Default

file

any

true

The file object or string file path

data

any

true

The data to append

charset

string

false

[utf-8] the default charset to open the file for writing

utf-8

Examples

Simple Example

Appends a mock entry to a file.

// Create mock log entry
logEntry = dateTimeFormat( now(), "yyyy/mm/dd HH:nn" ) & " this is a mock log entry!";
// Append line to file
fileAppend( "/path/to/file.log", logEntry );

Additional Examples

fileAppend( "path/to/file", "new content to append" );

Last updated

Was this helpful?