LIBFILE(3)

NAME
file.blocking.read, file.blocking.write, file.check.access, file.close, file.dup2, file.fcntl0, file.fcntl1, file.fd.fd.copy, file.mkdir, file.npipes, file.open, file.open3, file.pipe, file.rmdir, file.seek, file.sendfile, file.size, file.unlink, file.write, file.array.select, file.high.fd, file.altable.fd.fd.copy, file.altable.read, file.altable.write, file.nth.arg, file.num.args - KRoC file library

SYNOPSIS
#INCLUDE "filelib.inc"
#USE "file.lib"
kroc -lfile

PROC file.blocking.read (VAL INT fd, []BYTE buffer, INT result)
PROC file.blocking.write (VAL INT fd, VAL []BYTE buffer, INT result)
BOOL FUNCTION file.check.access (VAL []BYTE filename, VAL INT what)
PROC file.close (VAL INT fd)
PROC file.dup2 (VAL INT old.fd, VAL INT new.fd, INT result)
PROC file.fcntl0 (VAL INT fd, cmd, RESULT INT result)
PROC file.fcntl1 (VAL INT fd, cmd, arg, RESULT INT result)
PROC file.fd.fd.copy (VAL INT src.fd, dst.fd, count, INT result)
PROC file.mkdir (VAL []BYTE pathname, VAL INT perm, INT result)
PROC file.npipes ([]INT readers, writers, INT result)
PROC file.open (VAL []BYTE filename, VAL INT mode, INT fd)
PROC file.open3 (VAL []BYTE filename, VAL INT mode, VAL INT perm, INT fd)
PROC file.pipe (INT fd.0, fd.1, result)
PROC file.read (VAL INT fd, []BYTE buffer, INT result)
PROC file.rmdir (VAL []BYTE pathname, INT result)
PROC file.seek (VAL INT fd, VAL INT offset, VAL INT whence, INT result)
PROC file.sendfile (VAL INT src.fd, dst.fd, count, INT offset, result)
PROC file.size (VAL []BYTE filename, INT result)
PROC file.unlink (VAL []BYTE filename, INT result)
PROC file.write (VAL INT fd, VAL []BYTE buffer, INT result)

PROC file.array.select ([]INT read.set, write.set, except.set, VAL INT high.fd, timeout, RESULT INT result) INT FUNCTION file.high.fd (VAL []INT read.set, write.set, except.set)

PROC file.altable.fd.fd.copy (CHAN OF BOOL kill, CHAN OF INT repsonse, VAL INT src.fd, dst.fd, count, INT result)
PROC file.altable.read (CHAN OF BOOL kill, CHAN OF INT response, VAL INT fd, []BYTE buffer, INT result)
PROC file.altable.write (CHAN OF BOOL kill, CHAN OF INT response, VAL INT fd, VAL []BYTE buffer, INT result)

PROC file.nth.arg (VAL INT n, RESULT []BYTE arg, RESULT INT len)
PROC file.num.args (RESULT INT n)

DESCRIPTION
The occam file library provides a useful sub-set of the standard POSIX file handling functions, with some useful extras. A large proportion of the provided PROCs are implemented as direct C calls, and not as blocking calls, as they do not usually block in the OS kernel (open, close, ...).

AUTHOR
This manual page is maintained by Fred Barnes <frmb@kent.ac.uk>

SEE ALSO
kroc(1)
doc/bsclib.ps, doc/bsclib/index.html in the KRoC distribution