BE_WriteTextToFile ( path ; text {; append} )

Writes the contents specified in text to the file at the path. Using the optional append parameter you can choose to either write a new file ( or overwrite an existing one ), or to append the text to the end of the file.

Defaults to UTF-8 ( no BOM ) which can be changed using the BE_SetTextEncoding function.

Version : 1.0

Parameters :
path : a system file path. (for example, "/Users/johndoe/Documents/helloworld.txt" on OS X or "C:\Users\johndoe\Desktop\helloworld.txt" on Win7)
text : the contents to write to the file.
append ( optional ) : True or False - True will append to the file, False or no parameter will either write over an existing file or set the contents of a new file.

Result : 0 on success, ? for an invalid path and a OS error code on failures.

Have more questions? Submit a request


Article is closed for comments.