readAt method

Future<int> readAt(
  1. int offset,
  2. ReadBuf dst, {
  3. CancelToken? cancel,
})

Implementation

Future<int> readAt(int offset, ReadBuf dst, {CancelToken? cancel}) async {
  _checkReadable();
  cancel?.throwIfCancelled(path: path);
  if (offset < 0) throw RangeError.value(offset, 'offset');
  if (!dst.hasRemaining) return 0;
  return _track(_readAtImpl(offset, dst));
}