writeAtSync method

  1. @override
void writeAtSync(
  1. int offset,
  2. Uint8List bytes
)
override

Same-isolate commit path. The pager calls these in one straight-line sequence so a file statement does not pay an event-loop turn per syscall.

Implementation

@override
void writeAtSync(int offset, Uint8List bytes) {
  if (_closed) throw StateError('Storage closed');
  if (offset < 0) throw RangeError.value(offset);
  _file.setPositionSync(offset);
  _file.writeFromSync(bytes);
}