6 * Structures and types used to implement opendir/readdir/closedir
15 #include <sys/types.h>
18 /* struct dirent - same as Unix */
21 long d_ino
; /* inode (always 1 in WIN32) */
22 off_t d_off
; /* offset to this dirent */
23 unsigned short d_reclen
; /* length of d_name */
24 char d_name
[_MAX_FNAME
+ 1]; /* filename (null terminated) */
28 /* typedef DIR - not the same as Unix */
30 HANDLE handle
; /* _findfirst/_findnext handle */
31 short offset
; /* offset into directory */
32 short finished
; /* 1 if there are not more files */
33 WIN32_FIND_DATA fileinfo
; /* from _findfirst/_findnext */
34 char *dir
; /* the dir we are reading */
35 struct dirent dent
; /* the dirent to return */
38 /* Function prototypes */
39 DIR *opendir(const char *);
40 struct dirent
*readdir(DIR *);
41 int readdir_r(DIR *, struct dirent
*, struct dirent
**);
45 #endif /* READDIR_H */