.TH IO 2 .SH NAME readn, readfile \- file reading utilities .SH SYNOPSIS .EX include "io.m"; io := load Io Io->PATH; readn: fn(fd: ref Sys->FD, buf: array of byte, n: int): int; readfile: fn(fd: ref Sys->FD): array of byte; .EE .SH DESCRIPTION .B Io provides auxiliary functions used for file I/O, as a convenience. .PP .B Readn reads .I n bytes from the give .I fd (maybe less due to errors or EOF). .PP .B Readfile reads all the data availabe at .I fd and stops only when meeting EOF. This should not be used for huge files. .SH SOURCE .B /usr/octopus/port/lib/io.b