WriteFile
Write a file into the given filesystem.
var succ = WriteFile(strFileName, strBuffer, boolAppend);
Parameters
- strFileName : String, path and file name of file to be written, relative to the current directory of server execution.
- strBuffer : String, the content of the file which will be written or appended.
- boolAppend : Boolean, if true the current buffer will be appended to an existing file, if
false
the the file will be overwritten. Default isfalse
.
Return Values
0 if writing was successfull, null if an error occured.
Remarks
Example
var output = "This is the output, written in the file output.txt";
var succ = WriteFile("c:/output.txt");
if (succ)
{
Trace("WriteFile","succ");
}
else
{
Trace("WriteFile","err");
}