/
dir.hpp
47 lines (37 loc) · 956 Bytes
/
dir.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef RBX_BUILTIN_DIR_HPP
#define RBX_BUILTIN_DIR_HPP
#include "builtin/object.hpp"
#include "type_info.hpp"
namespace rubinius {
class MemoryPointer;
class String;
class Dir : public Object {
public:
const static size_t fields = 1;
const static object_type type = DirType;
private:
MemoryPointer* data_; // slot
public:
/* accessors */
attr_accessor(data, MemoryPointer);
/* interface */
static void init(STATE);
static Dir* create(STATE);
// Ruby.primitive :dir_open
OBJECT open(STATE, String *path);
// Ruby.primitive :dir_close
OBJECT close(STATE);
// Ruby.primitive :dir_closed_p
OBJECT closed_p(STATE);
// Ruby.primitive :dir_read
OBJECT read(STATE);
// Ruby.primitive :dir_control
OBJECT control(STATE, FIXNUM kind, INTEGER pos);
void guard(STATE);
class Info : public TypeInfo {
public:
BASIC_TYPEINFO(TypeInfo)
};
};
};
#endif