Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
rewinddir - reset file position indicator to start of directory stream
&pagelevel(4)&pagelevel
Syntax | #include <dirent.h> Optional #include <sys/types.h> (End) void rewinddir(DIR *dirp); |
Description | rewinddir() resets the position of the directory stream to which dirp refers to the beginning of the directory. It also causes the directory stream to refer to the current state of the corresponding directory, as a call to opendir() would have done. If dirp does not refer to a directory stream, the effect is undefined.
After a call to the fork() function, either the parent or child (but not both) may continue processing the directory stream using readdir() , rewinddir() or seekdir() . If both the parent and child processes use these functions, the result is undefined. |
Notes | rewinddir() should be used in conjunction with opendir() , readdir() and
closedir() to examine the contents of the directory. This method is recommended for portability.
rewinddir() is executed only for POSIX files.
|
See also | closedir() , opendir() , readdir() , dirent.h , sys/types.h .
|