in reply to Opendir, readdir & closedir.
With a directory handle, it starts at the beginning of the directory (when you open it with opendir()), then proceeds through the directory when you call readdir() until it gets to the end, and then it stops.
If you want to rewind the handle back to the beginning of the directory you need rewinddir.
Hugo
|
|---|