doWriteAsBytes method

Future<FileMixin> doWriteAsBytes(
  1. List<int> bytes, {
  2. FileMode mode = FileMode.write,
  3. bool flush = false,
})

Write bytes

Implementation

Future<FileMixin> doWriteAsBytes(List<int> bytes,
    {FileMode mode = FileMode.write, bool flush = false}) async {
  var sink = openWrite(mode: mode)..add(bytes);
  await sink.close();
  return this;
}