TextWriter
The TextWriter object, returned by the openTextWriter()
function, allows to open a text file, write to it and close it.
Methods
The following table describes the methods of the TextWriter object.
Property/method | Description |
---|---|
close() | Close the stream. |
newLine() | Creates a new line in the file. |
open(filename) | Creates a new writer on a file to write at the beginning of the file. Parameters:
|
open(inFilename, inEncoding, append) | Creates a new writer on a file. Parameters:
|
write(c) |
Writes a character in the file |
write(value) |
Writes a string in the file.
|