Moves the current read-write file pointer by an offset expressed as a 64-bit integer.
#include <prio.h> PRInt64 PR_Seek64( PRFileDesc *fd, PRInt64 offset, PRSeekWhence whence);
The function has the following parameters:
fd
PRFileDesc
object.offset
whence
PRSeekWhence
that specifies how to interpret the offset
parameter in setting the file pointer associated with the fd parameter. The value for the whence
parameter can be one of the following:
PR_SEEK_SET
. Sets the file pointer to the value of the offset
parameter.PR_SEEK_CUR
. Sets the file pointer to its current location plus the value of the offset
parameter.PR_SEEK_END
. Sets the file pointer to the size of the file plus the value of the offset
parameter.The function returns one of the following values:
PR_GetError
.This is the idiom for obtaining the current location (expressed as a 64-bit integer) of the file pointer for the file descriptor fd
:
PR_Seek64(fd, 0, PR_SEEK_CUR)
If the operating system can handle only a 32-bit file offset, PR_Seek64
may fail with the error code PR_FILE_TOO_BIG_ERROR
if the offset
parameter is out of the range of a 32-bit integer.