delorie.com/djgpp/doc/libc/libc_642.html | search |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <unistd.h> ssize_t read(int fd, void *buffer, size_t length); |
This function reads at most length bytes from file fd into
buffer. Note that in some cases, such as end-of-file conditions
and text files, it may read less than the requested number of bytes.
At end-of-file, read
will read exactly zero bytes.
Directories cannot be read using read
-- use readdir
instead.
The number of bytes read, zero meaning end-of-file, or -1 for an error.
ANSI/ISO C | No |
POSIX | 1003.2-1992; 1003.1-2001 |
char buf[10]; int r = read(0, buf, 10); |
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |