This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// write to file | |
var txtFile = "c:/test.txt"; | |
var file = new File(txtFile); | |
var str = "My string of text"; | |
file.open("w"); // open file with write access | |
file.writeln("First line of text"); | |
file.writeln("Second line of text " + str); | |
file.write(str); | |
file.close(); |