forsyth20121205-174063a80cc13 years agoHistory
48 lines · 741 B · Text
RawDownload
.TH SYS-SEEK 2.SH NAMEseek \- change file offset.SH SYNOPSIS.EXinclude "sys.m";sys := load Sys Sys->PATH; seek:  fn(fd: ref FD, off: big, start: int): big;.EE.SH DESCRIPTION.B Seeksets the 64-bit offset for the fileassociated with.I fdas follows:.IPIf.I startis.BR Sys->SEEKSTART ,the offset is set to.I offbytes..IPIf.I startis.BR Sys->SEEKRELA ,the pointer is set to its current location plus.IR off ..IPIf.I startis.BR Sys->SEEKEND ,the pointer is set to the size of thefile plus.IR off ..PPThe new file offset value is returned..PPSeeking in a pipe is not allowed.Seeking in a directory is allowed only if the new offset is zero..SH SEE ALSO.IR sys-intro (2),.IR sys-open (2),.IR bufio (2),