BE_FileWriteText ( path ; text {; appendBoolean } )

Writes the contents specified in text to the file at the path. Using the optional appendBoolean 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
1.1 : Adds appendBoolean option.
3.3 : Recursively create any directories needed.
4.0.2 : Renamed from BE_WriteTextToFile


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.

Still need help? Contact Us Contact Us