2 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
3 .\" Portions extracted from /usr/include/dirent.h are:
4 .\" Copyright 1991, 1992 Free Software Foundation
6 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
8 .TH getdirentries 3 (date) "Linux man-pages (unreleased)"
10 getdirentries \- get directory entries in a filesystem-independent format
13 .RI ( libc ", " \-lc )
16 .B #include <dirent.h>
18 .BI "ssize_t getdirentries(int " fd ", char " buf "[restrict ." nbytes "], \
20 .BI " off_t *restrict " basep );
24 Feature Test Macro Requirements for glibc (see
25 .BR feature_test_macros (7)):
32 glibc 2.19 and earlier:
33 _BSD_SOURCE || _SVID_SOURCE
36 Read directory entries from the directory specified by
43 Reading starts at offset
47 is updated with the new position after reading.
50 returns the number of bytes read or zero when at the end of the directory.
51 If an error occurs, \-1 is returned, and
53 is set to indicate the error.
55 See the Linux library source code for details.
57 For an explanation of the terms used in this section, see
65 Interface Attribute Value
68 T} Thread safety MT-Safe
75 Present on the BSDs, and a few other systems.