int read(int fd, void *buf, uint32 count)


Method Description

This function basically acts as its standard equivalent, except that it caches the data so as to improve performances.

fd is a file descriptor corresponding to an already opened file. This must be a descriptor returned by the library functions, and not by the standard ones.

buf is a buffer provided by the user. It must be large enough to contain all the data that will be read.

count is the maximum number of bytes this function should try to read.

The number of bytes read is returned.
On error, -1 is returned and error() will return the corresponding error code.

See also :

Writes to "opened" file descriptor. Does caching.
int write(int fd, void *buf, uint32 count)

Copyright © Nicolas Brodu, 1999 - 2000