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 .\" %%%LICENSE_START(VERBATIM)
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date. The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein. The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
27 .TH GETDIRENTRIES 3 2016-03-15 "GNU" "Linux Programmer's Manual"
29 getdirentries \- get directory entries in a filesystem-independent format
31 .B #include <dirent.h>
33 .BI "ssize_t getdirentries(int " fd ", char *" buf ", size_t " nbytes
34 .BI ", off_t *" basep );
37 Feature Test Macro Requirements for glibc (see
38 .BR feature_test_macros (7)):
44 Glibc 2.19 and earlier:
45 _BSD_SOURCE || _SVID_SOURCE
47 Read directory entries from the directory specified by
54 Reading starts at offset
58 is updated with the new position after reading.
61 returns the number of bytes read or zero when at the end of the directory.
62 If an error occurs, \-1 is returned, and
66 See the Linux library source code for details.
68 For an explanation of the terms used in this section, see
74 Interface Attribute Value
77 T} Thread safety MT-Safe
81 Present on the BSDs, and a few other systems.