]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk) |
2 | .\" | |
5fbde956 | 3 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
fea681da MK |
4 | .\" |
5 | .\" References consulted: | |
6 | .\" Linux libc source code | |
7 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
8 | .\" 386BSD man pages | |
9 | .\" Modified Sat Jul 24 18:46:01 1993 by Rik Faith (faith@cs.unc.edu) | |
10 | .\" Modified 11 June 1995 by Andries Brouwer (aeb@cwi.nl) | |
8f5aadb9 | 11 | .\" 2007-07-30 Ulrich Drepper <drepper@redhat.com>: document fdopendir(). |
45186a5d | 12 | .TH OPENDIR 3 2021-03-22 "Linux man-pages (unreleased)" |
fea681da | 13 | .SH NAME |
8f5aadb9 | 14 | opendir, fdopendir \- open a directory |
accf53e5 AC |
15 | .SH LIBRARY |
16 | Standard C library | |
8fc3b2cf | 17 | .RI ( libc ", " \-lc ) |
fea681da MK |
18 | .SH SYNOPSIS |
19 | .nf | |
20 | .B #include <sys/types.h> | |
fea681da | 21 | .B #include <dirent.h> |
68e4db0a | 22 | .PP |
fea681da | 23 | .BI "DIR *opendir(const char *" name ); |
8f5aadb9 | 24 | .BI "DIR *fdopendir(int " fd ); |
fea681da | 25 | .fi |
68e4db0a | 26 | .PP |
d39ad78f | 27 | .RS -4 |
682b5054 PB |
28 | Feature Test Macro Requirements for glibc (see |
29 | .BR feature_test_macros (7)): | |
d39ad78f | 30 | .RE |
68e4db0a | 31 | .PP |
682b5054 | 32 | .BR fdopendir (): |
9d2adbae MK |
33 | .nf |
34 | Since glibc 2.10: | |
5c10d2c5 | 35 | _POSIX_C_SOURCE >= 200809L |
9d2adbae MK |
36 | Before glibc 2.10: |
37 | _GNU_SOURCE | |
38 | .fi | |
fea681da | 39 | .SH DESCRIPTION |
60a90ecd MK |
40 | The |
41 | .BR opendir () | |
42 | function opens a directory stream corresponding to the | |
c13182ef MK |
43 | directory \fIname\fP, and returns a pointer to the directory stream. |
44 | The stream is positioned at the first entry in the directory. | |
847e0d88 | 45 | .PP |
8f5aadb9 | 46 | The |
e4114f64 | 47 | .BR fdopendir () |