User Tools

Site Tools




Function to write a string to a file. This function can create new files. Existing files will be overwritten. This function is the equivalent of the method .writeFile()


var content = "String to insert into file";
var file = new File("C:/myfile.txt");
writeFile(file, content);


Parameter Data type Required Description
file file object True The file to write the string to
content string The string to write to the file
encoding string The encoding to write the file. When not specified the default encoding UTF-8 is used.

Return Values

This method has no return values.

file/function_writefile.txt · Last modified: 2017/05/25 10:47 (external edit)