1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2 .\" Portions extracted from /usr/include/dirent.h are:
3 .\" Copyright 1991, 1992 Free Software Foundation
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
7 .TH getdirentries 3 (date) "Linux man-pages (unreleased)"
9 getdirentries \- get directory entries in a filesystem-independent format
12 .RI ( libc ", " \-lc )
15 .B #include <dirent.h>
17 .BI "ssize_t getdirentries(int " fd ", char *restrict " buf ", size_t " nbytes ,
18 .BI " off_t *restrict " basep );
22 Feature Test Macro Requirements for glibc (see
23 .BR feature_test_macros (7)):
30 Glibc 2.19 and earlier:
31 _BSD_SOURCE || _SVID_SOURCE
34 Read directory entries from the directory specified by
41 Reading starts at offset
45 is updated with the new position after reading.
48 returns the number of bytes read or zero when at the end of the directory.
49 If an error occurs, \-1 is returned, and
51 is set to indicate the error.
53 See the Linux library source code for details.
55 For an explanation of the terms used in this section, see
63 Interface Attribute Value
66 T} Thread safety MT-Safe
73 Present on the BSDs, and a few other systems.