Moo_FileWrite ( sFile; sText; bAppend; bOverwrite );
This function lets you write or append to a file.Parameters
Name | Type | Required | Default | Description |
sFile | String | Yes | The input file to be written/appended to. | |
sText | String | Yes | The text to write/append. | |
bAppend | Boolean | No | False | If true appends to the file if it exists. |
bOverwrite | Boolean | No | False | If 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 Code | Description |
Moo_FileWrite|Err_1 | Invalid number of arguments. |
Moo_FileWrite|Err_2 | Invalid source file input. |
Moo_FileWrite|Err_3 | Source file already exists. |
Moo_FileWrite|Err_4 | Error opening file. |
Moo_FileWrite|Err_5 | Error writing to file. |
Moo_FileWrite|Err_6 | Error removing file. |
Related Functions