close method
Closes the underlying file handle.
Implementation
Future<void> close() => _synchronized(() async {
if (_closed) return;
_closed = true;
try {
await _handle.close();
} on FileSystemException catch (error) {
throw ByteSourceIoException(
operation: 'close byte source',
cause: error,
location: _file.path,
);
}
}, allowClosed: true);