Ruby 2.0.0p247(2013-06-27revision41674)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

dir.h
Go to the documentation of this file.
1 #ifndef RUBY_WIN32_DIR_H
2 #define RUBY_WIN32_DIR_H
3
4 #ifdef __BORLANDC__
5 # ifndef WIN32_DIR_H_
6 # define WIN32_DIR_H_
7 # include <sys/types.h>
8 # endif
9 #endif
10
11 struct direct
12 {
13 long d_namlen;
14 ino_t d_ino;
15 char *d_name;
16 char d_isdir; /* directory */
17 char d_isrep; /* reparse point */
18 };
19 typedef struct {
20 WCHAR *start;
21 WCHAR *curr;
22 long size;
23 long nfiles;
24 long loc; /* [0, nfiles) */
25 struct direct dirstr;
26 char *bits; /* used for d_isdir and d_isrep */
27 } DIR;
28
29
30 DIR* rb_w32_opendir(const char*);
31 DIR* rb_w32_uopendir(const char*);
32 struct direct* rb_w32_readdir(DIR *, rb_encoding *);
33 long rb_w32_telldir(DIR *);
34 void rb_w32_seekdir(DIR *, long);
35 void rb_w32_rewinddir(DIR *);
36 void rb_w32_closedir(DIR *);
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 */
46