3 #ifndef SCM_WIN32_DIRENT_H
4 #define SCM_WIN32_DIRENT_H
6 /* Copyright (C) 2001, 2006 Free Software Foundation, Inc.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 3 of
11 * the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 /* Directory stream type.
25 The miscellaneous Unix `readdir' implementations read directory data
26 into a buffer and return `struct dirent *' pointers into it. */
28 #include <sys/types.h>
32 int fd
; /* File descriptor. */
33 char *data
; /* Directory block. */
34 size_t allocation
; /* Space allocated for the block. */
35 size_t size
; /* Total valid data in the block. */
36 size_t offset
; /* Current offset into the block. */
37 off_t filepos
; /* Position of next entry to read. */
38 char *mask
; /* Initial file mask. */
45 unsigned short int d_reclen
;
50 #define d_fileno d_ino /* Backwards compatibility. */
52 /* This is the data type of directory stream objects.
53 The actual structure is opaque to users. */
55 typedef struct dirstream
DIR;
57 DIR * opendir (const char * name
);
58 struct dirent
* readdir (DIR * dir
);
59 int closedir (DIR * dir
);
60 void rewinddir (DIR * dir
);
61 void seekdir (DIR * dir
, off_t offset
);
62 off_t
telldir (DIR * dir
);
63 int dirfd (DIR * dir
);
65 #endif /* SCM_WIN32_DIRENT_H */