Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The library functions described in this section can be used to open a directory and retrieve the names of the files it contains one by one.
Note:
The library functions for reading directories are layered on top of the getdents() system call (which is not part of SUSv3), but provide an interface that is easier to use. Linux also provides a readdir(2) system call (as opposed to the readdir(3) library function described here), which performs a similar task to, but is made obsolete by, getdents().