Read from an open file descriptor
UInt_Type read (FD_Type fd, Ref_Type buf, UInt_Type num)
The read function attempts to read at most num bytes
into the variable indicated by buf from the open file
descriptor fd. It returns the number of bytes read, or -1
and sets errno upon failure. The number of bytes read may be
less than num, and will be zero if an attempt is made to read
past the end of the file.
read is a low-level function and may return -1 for a variety
of reasons. For example, if non-blocking I/O has been specified for
the open file descriptor and no data is available for reading then
the function will return -1 and set errno to EAGAIN.
- slangrtl
-
close,
dup_fd,
fdopen,
fgets,
fgetslines,
fileno,
fread,
fwrite,
lseek,
open,
write
|