]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/opendir.3
open_memstream.3: Add LIBRARY section (libc)
[thirdparty/man-pages.git] / man3 / opendir.3
CommitLineData
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().
1d767b55 12.TH OPENDIR 3 2021-03-22 "GNU" "Linux Programmer's Manual"
fea681da 13.SH NAME
8f5aadb9 14opendir, fdopendir \- open a directory
fea681da
MK
15.SH SYNOPSIS
16.nf
17.B #include <sys/types.h>
fea681da 18.B #include <dirent.h>
68e4db0a 19.PP
fea681da 20.BI "DIR *opendir(const char *" name );
8f5aadb9 21.BI "DIR *fdopendir(int " fd );
fea681da 22.fi
68e4db0a 23.PP
d39ad78f 24.RS -4
682b5054
PB
25Feature Test Macro Requirements for glibc (see
26.BR feature_test_macros (7)):
d39ad78f 27.RE
68e4db0a 28.PP
682b5054 29.BR fdopendir ():
9d2adbae
MK
30.nf
31 Since glibc 2.10:
5c10d2c5 32 _POSIX_C_SOURCE >= 200809L
9d2adbae
MK
33 Before glibc 2.10:
34 _GNU_SOURCE
35.fi
fea681da 36.SH DESCRIPTION
60a90ecd
MK
37The
38.BR opendir ()
39function opens a directory stream corresponding to the
c13182ef
MK
40directory \fIname\fP, and returns a pointer to the directory stream.
41The stream is positioned at the first entry in the directory.
847e0d88 42.PP
8f5aadb9 43The
e4114f64 44.BR fdopendir ()