FAT | RFS | XFS | ZFS
rewinddir()
PROTOTYPE
#include <posix.h>
void rewinddir(DIR *dirp);
DESCRIPTION
rewinddir() resets the current position in the entry list of the open directory specified by dirp to its first entry. dirp must be a directory handle previously returned by opendir().
If an error occurs, errno is set to the appropriate error code.
ERROR CODES
| EBADF | dirp is not the handle of an open directory. |
EXAMPLE
/*-----------------------------------------------------------*/
/* Reset the directory's entry pointer. */
/*-----------------------------------------------------------*/
rewinddir(cur_dir);