]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk) |
2 | .\" | |
93015253 | 3 | .\" %%%LICENSE_START(VERBATIM) |
fea681da MK |
4 | .\" Permission is granted to make and distribute verbatim copies of this |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
c13182ef | 12 | .\" |
fea681da MK |
13 | .\" Since the Linux kernel and libraries are constantly changing, this |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
c13182ef | 20 | .\" |
fea681da MK |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
4b72fb64 | 23 | .\" %%%LICENSE_END |
fea681da MK |
24 | .\" |
25 | .\" References consulted: | |
26 | .\" Linux libc source code | |
27 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
28 | .\" 386BSD man pages | |
29 | .\" Modified Sat Jul 24 18:46:01 1993 by Rik Faith (faith@cs.unc.edu) | |
30 | .\" Modified 11 June 1995 by Andries Brouwer (aeb@cwi.nl) | |
8f5aadb9 | 31 | .\" 2007-07-30 Ulrich Drepper <drepper@redhat.com>: document fdopendir(). |
4b8c67d9 | 32 | .TH OPENDIR 3 2017-09-15 "GNU" "Linux Programmer's Manual" |
fea681da | 33 | .SH NAME |
8f5aadb9 | 34 | opendir, fdopendir \- open a directory |
fea681da MK |
35 | .SH SYNOPSIS |
36 | .nf | |
37 | .B #include <sys/types.h> | |
fea681da | 38 | .B #include <dirent.h> |
68e4db0a | 39 | .PP |
fea681da | 40 | .BI "DIR *opendir(const char *" name ); |
8f5aadb9 | 41 | .BI "DIR *fdopendir(int " fd ); |
fea681da | 42 | .fi |
68e4db0a | 43 | .PP |
682b5054 PB |
44 | .in -4n |
45 | Feature Test Macro Requirements for glibc (see | |
46 | .BR feature_test_macros (7)): | |
47 | .in | |
68e4db0a | 48 | .PP |
682b5054 | 49 | .BR fdopendir (): |
ea91c3fd MK |
50 | .PD 0 |
51 | .ad l | |
52 | .RS 4 | |
53 | .TP 4 | |
54 | Since glibc 2.10: | |
b0da7b8b | 55 | _POSIX_C_SOURCE\ >=\ 200809L |
ea91c3fd | 56 | .TP |
682b5054 PB |
57 | Before glibc 2.10: |
58 | _GNU_SOURCE | |
ea91c3fd MK |
59 | .RE |
60 | .ad | |
61 | .PD | |
fea681da | 62 | .SH DESCRIPTION |
60a90ecd MK |
63 | The |
64 | .BR opendir () | |
65 | function opens a directory stream corresponding to the | |
c13182ef MK |
66 | directory \fIname\fP, and returns a pointer to the directory stream. |
67 | The stream is positioned at the first entry in the directory. | |
847e0d88 | 68 | .PP |
8f5aadb9 | 69 | The |
e4114f64 | 70 | .BR fdopendir () |