Stream.seek

long seek(long offset, gmime.types.SeekWhence whence)

Repositions the offset of the stream stream to the argument offset according to the directive whence as follows:

#GMIME_STREAM_SEEK_SET: Seek offset bytes relative to the beginning (bound_start) of the stream.

#GMIME_STREAM_SEEK_CUR: Seek offset bytes relative to the current offset of the stream.

#GMIME_STREAM_SEEK_END: Seek offset bytes relative to the end of the stream (bound_end if non-negative).

Parameters

offsetpositional offset
whenceseek directive

Returns

the resultant position on success or %-1 on fail.