NAME
|
read, readn, write, pread, pwrite – read or write file |
SYNOPSIS
|
#include <u.h> #include <libc.h> |
DESCRIPTION
|
Read reads nbytes bytes of data from the offset in the file associated
with fd into memory at buf. The offset is advanced by the number
of bytes read. It is not guaranteed that all nbytes bytes will
be read; for example if the file refers to the console, at most
one line will be returned. In any event the number of bytes
read is returned. A return value of 0 is conventionally interpreted
as end of file.
|
SOURCE
|
/sys/src/libc/9syscall /sys/src/libc/port/readn.c |
SEE ALSO
|
intro(2), dirread(2), dup(2), open(2), pipe(2), readv(2) |
DIAGNOSTICS
|
These functions set errstr. |