4 * $Id: dirent.h,v 1.1 2001/09/05 19:10:00 cwolf Exp $
7 * Portions copyright Apache Software Foundation
9 * 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 */
31 long handle
; /* _findfirst/_findnext handle */
32 short offset
; /* offset into directory */
33 short finished
; /* 1 if there are not more files */
34 struct _finddata_t fileinfo
; /* from _findfirst/_findnext */
35 char *dir
; /* the dir we are reading */
36 struct dirent dent
; /* the dirent to return */
40 /* Function prototypes */
42 struct dirent
*readdir(DIR *);
46 #define __S_ISTYPE(mode, mask) (((mode) & _S_IFMT) == (mask))
47 #define S_ISREG(mode) __S_ISTYPE((mode), _S_IFREG)
49 #endif /* _DIRENT_H */