createFileOutput
Createsa new file or appendsto an existing file. Insteadof saving XML or string data, gives accessto write raw bytes (or strings, or shorts, or ints, etc.).Also gives the ability to append to a file. Once open, it does not close the file until the panel is closed or close() is called. This is handyfor logging.
Similar to MessageBuilder (see createMessageBuilder on page 153).
Syntax
ogscript.createFileOutput (File path, appendToExistingfile);
Parameters
Parameter |
Type |
Required |
Description |
File path |
String |
Yes |
File path of the file to be created or appended. |
appendToExistingfile |
Boolean |
Yes |
When true, data is appended to existing file. When false, a new file is created. |
Returns
FileOutputBuilder, which is same as MessageBuilder with added functions for clear() (overwrite file), close(), getSize(), flush(), and isClosed().
Example
Coming soon.