flush() and close the underlying file.
@override void close() { if (_closed) return; _closed = true; if (!_readonly) flush(); _file.unlockSync(); _file.closeSync(); _finalizer.detach(this); }