Ruby  2.5.0dev(2017-10-22revision60238)
dir.h
Go to the documentation of this file.
1 #ifndef RUBY_WIN32_DIR_H
2 #define RUBY_WIN32_DIR_H
3 
4 #define DT_UNKNOWN 0
5 #define DT_DIR (S_IFDIR>>12)
6 #define DT_REG (S_IFREG>>12)
7 #define DT_LNK 10
8 
9 struct direct
10 {
11  long d_namlen;
12  ino_t d_ino;
13  char *d_name;
14  char *d_altname; /* short name */
15  short d_altlen;
17 };
18 typedef struct {
19  WCHAR *start;
20  WCHAR *curr;
21  long size;
22  long nfiles;
23  long loc; /* [0, nfiles) */
24  struct direct dirstr;
25  char *bits; /* used for d_isdir and d_isrep */
26 } DIR;
27 
28 
29 DIR* rb_w32_opendir(const char*);
30 DIR* rb_w32_uopendir(const char*);
31 struct direct* rb_w32_readdir(DIR *, rb_encoding *);
32 long rb_w32_telldir(DIR *);
33 void rb_w32_seekdir(DIR *, long);
34 void rb_w32_rewinddir(DIR *);
35 void rb_w32_closedir(DIR *);
36 char *rb_w32_ugetcwd(char *, int);
37 
38 #define opendir(s) rb_w32_opendir((s))
39 #define readdir(d) rb_w32_readdir((d), 0)
40 #define telldir(d) rb_w32_telldir((d))
41 #define seekdir(d, l) rb_w32_seekdir((d), (l))
42 #define rewinddir(d) rb_w32_rewinddir((d))
43 #define closedir(d) rb_w32_closedir((d))
44 
45 #endif /* RUBY_WIN32_DIR_H */
long d_namlen
Definition: dir.h:11
Definition: dir.h:9
ino_t d_ino
Definition: dir.h:12
DIR * rb_w32_uopendir(const char *)
Definition: win32.c:2124
Definition: dir.h:18
DIR * rb_w32_opendir(const char *)
Definition: win32.c:2111
long rb_w32_telldir(DIR *)
Definition: win32.c:2303
unsigned char uint8_t
Definition: sha2.h:100
long loc
Definition: dir.h:23
char * bits
Definition: dir.h:25
long nfiles
Definition: dir.h:22
WCHAR * start
Definition: dir.h:19
WCHAR * curr
Definition: dir.h:20
struct direct * rb_w32_readdir(DIR *, rb_encoding *)
Definition: win32.c:2282
short d_altlen
Definition: dir.h:15
char * d_altname
Definition: dir.h:14
char * rb_w32_ugetcwd(char *, int)
Definition: win32.c:4732
void rb_w32_closedir(DIR *)
Definition: win32.c:2341
long size
Definition: dir.h:21
uint8_t d_type
Definition: dir.h:16
void rb_w32_rewinddir(DIR *)
Definition: win32.c:2329
void rb_w32_seekdir(DIR *, long)
Definition: win32.c:2314
char * d_name
Definition: dir.h:13