Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

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;
16 uint8_t d_type;
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 */
ino_t
__ino_t ino_t
Definition: rb_mjit_min_header-2.7.0.h:1315
rb_w32_opendir
DIR * rb_w32_opendir(const char *)
Definition: win32.c:2166
rb_w32_closedir
void rb_w32_closedir(DIR *)
Definition: win32.c:2396
rb_w32_ugetcwd
char * rb_w32_ugetcwd(char *, int)
Definition: win32.c:4738
direct::d_altlen
short d_altlen
Definition: dir.h:15
rb_w32_telldir
long rb_w32_telldir(DIR *)
Definition: win32.c:2358
direct::d_type
uint8_t d_type
Definition: dir.h:16
rb_encoding
const typedef OnigEncodingType rb_encoding
Definition: encoding.h:115
rb_w32_readdir
struct direct * rb_w32_readdir(DIR *, rb_encoding *)
Definition: win32.c:2337
DIR::nfiles
long nfiles
Definition: dir.h:22
rb_w32_rewinddir
void rb_w32_rewinddir(DIR *)
Definition: win32.c:2384
uint8_t
unsigned char uint8_t
Definition: sha2.h:100
direct::d_ino
ino_t d_ino
Definition: dir.h:12
DIR::bits
char * bits
Definition: dir.h:25
rb_w32_seekdir
void rb_w32_seekdir(DIR *, long)
Definition: win32.c:2369
DIR::curr
WCHAR * curr
Definition: dir.h:20
rb_w32_uopendir
DIR * rb_w32_uopendir(const char *)
Definition: win32.c:2179
DIR::start
WCHAR * start
Definition: dir.h:19
DIR
Definition: dir.h:18
direct::d_altname
char * d_altname
Definition: dir.h:14
direct::d_name
char * d_name
Definition: dir.h:13
direct
Definition: dir.h:9
DIR::size
long size
Definition: dir.h:21
DIR::loc
long loc
Definition: dir.h:23
direct::d_namlen
long d_namlen
Definition: dir.h:11