2004-01-19 07:28:14 -05:00
|
|
|
#ifndef RUBY_WIN32_DIR_H
|
|
|
|
#define RUBY_WIN32_DIR_H
|
|
|
|
|
2002-06-10 21:27:48 -04:00
|
|
|
#ifdef __BORLANDC__
|
|
|
|
# ifndef WIN32_DIR_H_
|
|
|
|
# define WIN32_DIR_H_
|
|
|
|
# include <sys/types.h>
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2001-05-30 19:02:54 -04:00
|
|
|
struct direct
|
|
|
|
{
|
|
|
|
long d_namlen;
|
|
|
|
ino_t d_ino;
|
2007-03-17 19:42:00 -04:00
|
|
|
char *d_name;
|
2004-01-05 05:01:54 -05:00
|
|
|
char d_isdir; /* directory */
|
|
|
|
char d_isrep; /* reparse point */
|
2001-05-30 19:02:54 -04:00
|
|
|
};
|
|
|
|
typedef struct {
|
|
|
|
char *start;
|
|
|
|
char *curr;
|
|
|
|
long size;
|
|
|
|
long nfiles;
|
2006-01-01 00:49:01 -05:00
|
|
|
long loc; /* [0, nfiles) */
|
2004-01-05 11:01:54 -05:00
|
|
|
struct direct dirstr;
|
2004-01-05 05:01:54 -05:00
|
|
|
char *bits; /* used for d_isdir and d_isrep */
|
2001-05-30 19:02:54 -04:00
|
|
|
} DIR;
|
|
|
|
|
2002-05-29 06:22:19 -04:00
|
|
|
|
|
|
|
DIR* rb_w32_opendir(const char*);
|
|
|
|
struct direct* rb_w32_readdir(DIR *);
|
2006-08-12 02:56:09 -04:00
|
|
|
off_t rb_w32_telldir(DIR *);
|
|
|
|
void rb_w32_seekdir(DIR *, off_t);
|
2002-05-29 06:22:19 -04:00
|
|
|
void rb_w32_rewinddir(DIR *);
|
|
|
|
void rb_w32_closedir(DIR *);
|
|
|
|
|
|
|
|
#define opendir rb_w32_opendir
|
|
|
|
#define readdir rb_w32_readdir
|
|
|
|
#define telldir rb_w32_telldir
|
|
|
|
#define seekdir rb_w32_seekdir
|
|
|
|
#define rewinddir rb_w32_rewinddir
|
|
|
|
#define closedir rb_w32_closedir
|
2004-01-19 07:28:14 -05:00
|
|
|
|
|
|
|
#endif /* RUBY_WIN32_DIR_H */
|