Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:20
What would you like to do?
#include <dirent.h>
DIR *opendir(const char *pathname);
DIR *fdopendir(int fd);
/* Both return: pointer if OK, NULL on error */
struct dirent *readdir(DIR *dp);
/* Returns: pointer if OK, NULL at end of directory or error */
void rewinddir(DIR *dp);
int closedir(DIR *dp);
/* Returns: 0 if OK, −1 on error */
long telldir(DIR *dp);
/* Returns: current location in directory associated with dp */
void seekdir(DIR *dp, long loc);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment