close a directory NAME closedir - close a directory LIBRARY Standard C library ( libc , -lc ) SYNOPSIS #include <sys/type......the file position, such as fstat (2) and fchdir (2). It will be automatically closed when closedir (3) is called. RETURN VALUE On success, dirfd () returns a file descriptor (a …...hread safety MT-Safe STANDARDS POSIX.1-2008. HISTORY POSIX.1-2001, SVr4, 4.3BSD. SEE ALSO closedir (3), opendir (3), readdir (3), scandir (3), seekdir (3), telldir (3)...e careful in making any assumptions about the value in this argument. SEE ALSO lseek (2), closedir (3), opendir (3), readdir (3), rewinddir (3), scandir (3), telldir (3)...reat this strictly as an opaque value, making no assumptions about its contents. SEE ALSO closedir (3), opendir (3), readdir (3), rewinddir (3), scandir (3), seekdir (3)...endir () will set the close-on-exec flag for the file descriptor, fd . SEE ALSO open (2), closedir (3), dirfd (3), readdir (3), rewinddir (3), scandir (3), seekdir (3), telldir …...endir () will set the close-on-exec flag for the file descriptor, fd . SEE ALSO open (2), closedir (3), dirfd (3), readdir (3), rewinddir (3), scandir (3), seekdir (3), telldir …...namelist[n]->d_name); free(namelist[n]); } free(namelist); exit(EXIT_SUCCESS); } SEE ALSO closedir (3), fnmatch (3), opendir (3), readdir (3), rewinddir (3), seekdir (3), strcmp…...namelist[n]->d_name); free(namelist[n]); } free(namelist); exit(EXIT_SUCCESS); } SEE ALSO closedir (3), fnmatch (3), opendir (3), readdir (3), rewinddir (3), seekdir (3), strcmp…...namelist[n]->d_name); free(namelist[n]); } free(namelist); exit(EXIT_SUCCESS); } SEE ALSO closedir (3), fnmatch (3), opendir (3), readdir (3), rewinddir (3), seekdir (3), strcmp…...namelist[n]->d_name); free(namelist[n]); } free(namelist); exit(EXIT_SUCCESS); } SEE ALSO closedir (3), fnmatch (3), opendir (3), readdir (3), rewinddir (3), seekdir (3), strcmp…...s unlikely that the names will be sorted in any fashion. SEE ALSO getdents (2), read (2), closedir (3), dirfd (3), ftw (3), offsetof (3), opendir (3), readdir_r (3), rewinddir (…...racters can't match a leading period. GLOB_ALTDIRFUNC Use alternative functions pglob->gl_closedir , pglob->gl_readdir , pglob->gl_opendir , pglob->gl_lstat , and pglob->gl_stat…...racters can't match a leading period. GLOB_ALTDIRFUNC Use alternative functions pglob->gl_closedir , pglob->gl_readdir , pglob->gl_opendir , pglob->gl_lstat , and pglob->gl_stat…