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

NAME

6       opendir - open a directory
7

SYNOPSIS

9       #include <sys/types.h>
10       #include <dirent.h>
11
12       DIR *opendir(const char *name);
13

DESCRIPTION

15       The  opendir()  function  opens a directory stream corresponding to the
16       directory name, and returns a pointer to  the  directory  stream.   The
17       stream is positioned at the first entry in the directory.
18

RETURN VALUE

20       The  opendir()  function returns a pointer to the directory stream.  On
21       error, NULL is returned, and errno is set appropriately.
22

ERRORS

24       EACCES Permission denied.
25
26       EMFILE Too many file descriptors in use by process.
27
28       ENFILE Too many files are currently open in the system.
29
30       ENOENT Directory does not exist, or name is an empty string.
31
32       ENOMEM Insufficient memory to complete the operation.
33
34       ENOTDIR
35              name is not a directory.
36

NOTES

38       The underlying file descriptor of the directory stream can be  obtained
39       using dirfd(3).
40

CONFORMING TO

42       SVr4, 4.3BSD, POSIX.1-2001.
43

SEE ALSO

45       open(2),  closedir(3),  dirfd(3), readdir(3), rewinddir(3), scandir(3),
46       seekdir(3), telldir(3)
47
48
49
50                                  1995-06-11                        OPENDIR(3)
Impressum