2018.2

Table Of Contents
}
fileIn.close();
fileOut.close();
deleteFile(data.filename);
tmp.move(data.filename);
tmp.close();
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:
l filename: the path of the file to open
open(inFilename, inEncoding,
append)
Creates a new writer on a file.
Parameters:
l inFileName: the path of the file
l inEncoding: the encoding to be used when writing
to the file
l append: boolean; true if the data will be written at
the end of the file
write(c) Writes a character in the file
Page 369