openWrite abstract method
Creates a new independent StreamSink for the file. The StreamSink must be closed when no longer used, to free system resources.
An StreamSink for a file can be opened in two modes:
- FileMode.write: truncates the file to length zero.
- FileMode.append: sets the initial write position to the end of the file.
When writing strings through the returned StreamSink the encoding
specified using encoding
will be used. The returned StreamSink
has an encoding
property which can be changed after the
StreamSink has been created.
Implementation
StreamSink<List<int>> openWrite(
{FileMode mode = FileMode.write, Encoding encoding = utf8});