clear method

Future<void> clear()

Implementation

Future<void> clear() async {
  _offsets.clear();
  _lengths.clear();
  _memory.clear();
  _cache.clear();
  _tail = 0;
  await _writer?.close();
  _writer = null;
  final File? file = _file;
  if (file != null && file.existsSync()) await file.delete();
}