openWrite abstract method

StreamSink<List<int>> openWrite({
  1. FileMode mode = FileMode.write,
  2. Encoding encoding = utf8,
})

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:

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});