Site Tools


Sidebar

New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
file:function_writefile

writeFile()

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()

Usage

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

Parameters

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: 2020/02/26 17:10 (external edit)