Interface Seeker
Index
Methods
Methods
seek
- seek(offset, whence): Promise<number>
Seek sets the offset for the next
read()orwrite()to offset, interpreted according towhence:Startmeans relative to the start of the file,Currentmeans relative to the current offset, andEndmeans relative to the end. Seek resolves to the new offset relative to the start of the file.Seeking to an offset before the start of the file is an error. Seeking to any positive offset is legal, but the behavior of subsequent I/O operations on the underlying object is implementation-dependent.
It resolves with the updated offset.
Parameters
- offset: number | bigint
- whence: SeekMode
Returns Promise<number>
An abstract interface which when implemented provides an interface to seek within an open file/resource asynchronously.