Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (2) — Inferno 3rd Edition

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sys-intro(2)

sys-open(2)

bufio(2)

SYS-SEEK(2)

NAME

seek − change file offset

SYNOPSIS

include "sys.m"; sys := load Sys Sys->PATH;
 
seek:  fn(fd: ref FD, off, start: int): int;

DESCRIPTION

Seek sets the offset for the file associated with fd as follows:

If start is Sys->SEEKSTART, the offset is set to off bytes. 

If start is Sys->SEEKRELA, the pointer is set to its current location plus off.

If start is Sys->SEEKEND, the pointer is set to the size of the file plus off.

The new file offset value is returned. 

Seeking in a directory is not allowed. 

SEE ALSO

sys-intro(2), sys-open(2), bufio(2),

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026