write method

  1. @override
void write(
  1. String path,
  2. Uint8List bytes,
  3. int offset
)
override

Writes a chunk from bytes into the file at path path and offset offset.

Implementation

@override
void write(String path, Uint8List bytes, int offset) {
  _checkClosed();

  final previousContent = _memory.fileData[path] ?? Uint8List(0);

  _memory.write(path, bytes, offset);

  if (!_inMemoryOnlyFiles.contains(path)) {
    _submitWork(_WriteFileWorkItem(this, path, previousContent)
      ..writes.add(_OffsetAndBuffer(offset, bytes)));
  }
}