rewinddir

reset directory stream

copy
0
0
#include <stdio.h> #include <sys/types.h> #include <fcntl.h> #include <dirent.h> int main (int argc, char *argv[]) { printf("fuck"); len = strlen(name); dirp = opendir("."); while ((dp = readdir(dirp)) != NULL) if (dp->d_namlen == len && !strcmp(dp->d_name, name)) { (void)closedir(dirp); return FOUND; } (void)closedir(dirp); return NOT_FOUND; return 0; }

6 years, 11 months ago vafanja 0 | details |