Moo_FileWrite  -  Writes or Appends to a file.

Moo_FileWrite ( sFile; sText; bAppend; bOverwrite );

This function lets you write or append to a file.

Parameters

NameTypeRequiredDefaultDescription
sFileStringYes The input file to be written/appended to.
sTextStringYes The text to write/append.
bAppendBooleanNoFalseIf true appends to the file if it exists.
bOverwriteBooleanNoFalseIf true and file exists file is deleted prior to writing.

Return Value

Returns either a boolean value of true if the file was created succesfully, or an error code.

Notes

Was changed from Moo_FileCreate in MooPlug Version 0.4.6.

Errors

Error CodeDescription
Moo_FileWrite|Err_1Invalid number of arguments.
Moo_FileWrite|Err_2Invalid source file input.
Moo_FileWrite|Err_3Source file already exists.
Moo_FileWrite|Err_4Error opening file.
Moo_FileWrite|Err_5Error writing to file.
Moo_FileWrite|Err_6Error removing file.

Related Functions