1CLOSEDIR(3)                Linux Programmer's Manual               CLOSEDIR(3)
2
3
4

NAME

6       closedir - close a directory
7

SYNOPSIS

9       #include <sys/types.h>
10
11       #include <dirent.h>
12
13       int closedir(DIR *dirp);
14

DESCRIPTION

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

RETURN VALUE

22       The closedir()  function  returns  0  on  success.   On  error,  -1  is
23       returned, and errno is set appropriately.
24

ERRORS

26       EBADF  Invalid directory stream descriptor dirp.
27

CONFORMING TO

29       SVr4, POSIX.1-2001, 4.3BSD.
30

SEE ALSO

32       close(2), opendir(3), readdir(3), rewinddir(3), scandir(3), seekdir(3),
33       telldir(3)
34

COLOPHON

36       This page is part of release 3.22 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)
Impressum