Wrap opendir(), telldir(), seekdir(), rewinddir() and closedir()