seek

open fun seek(offset: Long, loc: SeekOrigin): Long

Sets the position within the current stream to the specified value.

Return

The new position within the stream, calculated by combining the initial reference point and the offset.

Parameters

offset

The new position within the stream. This is relative to the loc parameter, and can be positive or negative.

loc

A value of type SeekOrigin, which acts as the seek reference point.