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