flush method

Future<void> flush()

Force buffered operations to the filesystem.

Implementation

Future<void> flush() => _lock.synchronized(() async {
      if (!_initialized) return;

      _checkNotClosed();
      await _trimToSize();
      await _journalWriter!.flush();
    });