method seek
Documentation for method seek
assembled from the following types:
class IO::CatHandle
From IO::CatHandle
(IO::CatHandle) method seek
Defined as:
method seek(IO::CatHandle: |c)
Calls .seek
on the currently active source handle, forwarding it all the arguments, and returns the result. Returns Nil if the source handle queue has been exhausted. NOTE: this method does NOT perform any source handle switching, so seeking past the end of the current source handle will NOT seek to the next source handle in the queue and seeking past the beginning of the current source handle is a fatal error. Also see .next-handle
, to learn the details on when source handles are switched.
(my = 'foo'.IO).spurt: 'foo';(my = 'bar'.IO).spurt: 'bar';with IO::CatHandle.new: ,
class IO::Handle
From IO::Handle
(IO::Handle) method seek
Defined as:
method seek(IO::Handle: Int , SeekType --> True)
Move the file pointer (that is, the position at which any subsequent read or write operations will begin) to the byte position specified by $offset
relative to the location specified by $whence
which may be one of:
SeekFromBeginning
: The beginning of the file.SeekFromCurrent
: The current position in the file.SeekFromEnd
: The end of the file. Please note that you need to specify a negative offset if you want to position before the end of the file.