rewinddir

Resets the position of a directory stream to the first entry in a directory.

Library:LibC
Classification:POSIX
Service:File and Directory I/O

Syntax

  #include <dirent.h> 
   
  void rewinddir (
     DIR  *dirp);
  

Parameters

dirp

(IN/OUT) Points to the directory to set so that dirp points to the first entry. For information about the structure, see DIR.

Remarks

The rewinddir function 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

See Also