1CLOSEDIR(3) Linux Programmer's Manual CLOSEDIR(3)
2
3
4
6 closedir - close a directory
7
9 #include <sys/types.h>
10
11 #include <dirent.h>
12
13 int closedir(DIR *dirp);
14
16 The closedir() function closes the directory stream associated with
17 dirp. A successful call to closedir() also closes the underlying file
18 descriptor associated with dirp. The directory stream descriptor dirp
19 is not available after this call.
20
22 The closedir() function returns 0 on success. On error, -1 is
23 returned, and errno is set appropriately.
24
26 EBADF Invalid directory stream descriptor dirp.
27
29 SVr4, POSIX.1-2001, 4.3BSD.
30
32 close(2), opendir(3), readdir(3), rewinddir(3), scandir(3), seekdir(3),
33 telldir(3)
34
36 This page is part of release 3.25 of the Linux man-pages project. A
37 description of the project, and information about reporting bugs, can
38 be found at http://www.kernel.org/doc/man-pages/.
39
40
41
42 2008-09-23 CLOSEDIR(3)