setPositionSync method

  1. @override
void setPositionSync(
  1. int position
)
override

Synchronously sets the byte position in the file.

Throws a FileSystemException if the operation fails.

Implementation

@override
void setPositionSync(int position) {
  _assertIsOpen();

  if (position < 0) {
    throw ArgumentError.value(position, 'position', 'must be non-negative');
  }

  _position = position;
}