Plan 9 from Bell Labs’s /usr/web/sources/contrib/nemo/octopus/man/2/io

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.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

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].