Skip to content

Instantly share code, notes, and snippets.

@shichao-an shichao-an/apue_dirent.h
Last active Aug 29, 2015

Embed
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
You can’t perform that action at this time.