write method
Truncates and Writes line
to the file terminated by newline
.
newline
defaults to '\n'.
e.g.
'/tmp/log'.write('Start of Log')
See append appends a line to an existing file.
Implementation
void write(String line, {String newline = '\n'}) {
FileSync(this)
..write(line, newline: newline)
..close();
}