rewinddir()

reset directory stream position to beginning of directory 

Function


SYNOPSIS

#include <sys/types.h>

#include <dirent.h>

void rewinddir(DIR *dirp);


DESCRIPTION

The rewinddir() function resets the position (associated with the directory stream that dirp points to) to the beginning of the directory. Additionally, it causes the directory stream to refer to the current state of the corresponding directory, in the same way that a call to opendir() would. rewinddir() does not return a value.

If a file is removed from the directory after the most recent call to rewinddir(), a subsequent call to readdir() or readdir_r() returns an entry for that file. If a file is added to the directory after the most recent call to rewinddir(), a subsequent call to readdir() or readdir_r() does not return an entry for the added file.


PARAMETERS

dirp 

Points to the directory stream of the directory to rewind.


RETURN VALUES

None.


CONFORMANCE

POSIX.1 (1996).


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
closedir(), opendir(), readdir(), readdir_r(), seekdir(), telldir()


PTC MKS Toolkit 10.4 Documentation Build 39.