Buy GNU books!
int getdents (fildes, buf, nbyte)
Getdents attempts to read nbyte bytes from the directory associated with fildes and to format them as file system independent entries in the buffer pointed to by buf. Since the file system independent directory entries are of variable length, in most cases the actual number of bytes returned will be less than nbyte.
The file system independent directory entry is specified by the dirent structure. For a description of this see dirent(4).
On devices capable of seeking, getdents starts at a position in the file given by the file pointer associated with fildes. Upon return from getdents, the file pointer has been incremented to point to the next directory entry.
This system call was developed in order to implement the readdir routine [for a description see directory(3C)] and should not be used for other purposes.
The exact set of errno values and meanings may vary among implementations.
|webmaster donations bookstore||delorie software privacy|
|Copyright © 2003 by The Free Software Foundation||Updated Jun 2003|