getdirentries.2 (21907) | getdirentries.2 (23660) |
---|---|
1.\" Copyright (c) 1989, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 15 unchanged lines hidden (view full) --- 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" | 1.\" Copyright (c) 1989, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 15 unchanged lines hidden (view full) --- 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" |
32.\" @(#)getdirentries.2 8.1 (Berkeley) 6/9/93 | 32.\" @(#)getdirentries.2 8.2 (Berkeley) 5/3/95 |
33.\" | 33.\" |
34.Dd June 9, 1993 | 34.Dd May 3, 1995 |
35.Dt GETDIRENTRIES 2 36.Os 37.Sh NAME 38.Nm getdirentries 39.Nd "get directory entries in a filesystem independent format" 40.Sh SYNOPSIS 41.Fd #include <sys/dirent.h> 42.Ft int --- 19 unchanged lines hidden (view full) --- 62with buffers smaller than this size. 63.Pp 64The data in the buffer is a series of 65.Em dirent 66structures each containing the following entries: 67.Bd -literal -offset indent 68unsigned long d_fileno; 69unsigned short d_reclen; | 35.Dt GETDIRENTRIES 2 36.Os 37.Sh NAME 38.Nm getdirentries 39.Nd "get directory entries in a filesystem independent format" 40.Sh SYNOPSIS 41.Fd #include <sys/dirent.h> 42.Ft int --- 19 unchanged lines hidden (view full) --- 62with buffers smaller than this size. 63.Pp 64The data in the buffer is a series of 65.Em dirent 66structures each containing the following entries: 67.Bd -literal -offset indent 68unsigned long d_fileno; 69unsigned short d_reclen; |
70unsigned short d_namlen; | 70unsigned char d_type; 71unsigned char d_namlen; |
71char d_name[MAXNAMELEN + 1]; /* see below */ 72.Ed 73.Pp 74The 75.Fa d_fileno 76entry is a number which is unique for each 77distinct file in the filesystem. 78Files that are linked by hard links (see 79.Xr link 2 ) 80have the same 81.Fa d_fileno . 82The 83.Fa d_reclen 84entry is the length, in bytes, of the directory record. 85The | 72char d_name[MAXNAMELEN + 1]; /* see below */ 73.Ed 74.Pp 75The 76.Fa d_fileno 77entry is a number which is unique for each 78distinct file in the filesystem. 79Files that are linked by hard links (see 80.Xr link 2 ) 81have the same 82.Fa d_fileno . 83The 84.Fa d_reclen 85entry is the length, in bytes, of the directory record. 86The |
87.Fa d_type 88entry is the type of the file pointed to by the directory record. 89The file type values are defined in 90.Fa <sys/dirent.h> . 91The |
|
86.Fa d_name 87entry contains a null terminated file name. 88The 89.Fa d_namlen 90entry specifies the length of the file name excluding the null byte. 91Thus the actual size of 92.Fa d_name 93may vary from 1 to --- 82 unchanged lines hidden --- | 92.Fa d_name 93entry contains a null terminated file name. 94The 95.Fa d_namlen 96entry specifies the length of the file name excluding the null byte. 97Thus the actual size of 98.Fa d_name 99may vary from 1 to --- 82 unchanged lines hidden --- |