Ruby
3.4.0dev (2024-11-23 revision b4d13fac3dd5420475aa1e14fdad8137da7e3ee0)
win32
dir.h
1
#ifndef RUBY_WIN32_DIR_H
2
#define RUBY_WIN32_DIR_H
3
#include <stdint.h>
/* for uint8_t */
4
#include <basetsd.h>
/* for WCHAR */
5
#include "
ruby/encoding.h
"
/* for rb_encoding */
6
7
#define DT_UNKNOWN 0
8
#define DT_DIR (S_IFDIR>>12)
9
#define DT_REG (S_IFREG>>12)
10
#define DT_LNK 10
11
12
struct
direct
13
{
14
long
d_namlen;
15
ino_t d_ino;
16
char
*d_name;
17
char
*d_altname;
/* short name */
18
short
d_altlen;
19
uint8_t d_type;
20
};
21
typedef
struct
{
22
WCHAR *start;
23
WCHAR *curr;
24
long
size;
25
long
nfiles;
26
long
loc;
/* [0, nfiles) */
27
struct
direct
dirstr;
28
char
*bits;
/* used for d_isdir and d_isrep */
29
}
DIR
;
30
31
32
DIR
* rb_w32_opendir(
const
char
*);
33
DIR
* rb_w32_uopendir(
const
char
*);
34
struct
direct
* rb_w32_readdir(
DIR
*,
rb_encoding
*);
35
struct
direct
* rb_w32_ureaddir(
DIR
*);
36
long
rb_w32_telldir(
DIR
*);
37
void
rb_w32_seekdir(
DIR
*,
long
);
38
void
rb_w32_rewinddir(
DIR
*);
39
int
rb_w32_closedir(
DIR
*);
40
char
*rb_w32_ugetcwd(
char
*,
int
);
41
42
#define opendir(s) rb_w32_uopendir((s))
43
#define readdir(d) rb_w32_ureaddir((d))
44
#define telldir(d) rb_w32_telldir((d))
45
#define seekdir(d, l) rb_w32_seekdir((d), (l))
46
#define rewinddir(d) rb_w32_rewinddir((d))
47
#define closedir(d) rb_w32_closedir((d))
48
#define getcwd(b, s) rb_w32_ugetcwd(b, s)
49
50
#endif
/* RUBY_WIN32_DIR_H */
encoding.h
Encoding relates APIs.
DIR
Definition:
dir.h:21
OnigEncodingTypeST
Definition:
onigmo.h:160
direct
Definition:
dir.h:13
Generated by
1.9.1