forked from rubinius/rubinius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ar.hpp
55 lines (37 loc) · 910 Bytes
/
ar.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
48
49
50
51
52
53
54
#ifndef RBX_AR_HPP
#define RBX_AR_HPP
#include <fcntl.h>
#include <cstring>
#include <strings.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
#include <stdint.h>
#include <cstdlib>
namespace rubinius {
/*
* @todo Name parameters to each_file(). --rue
* @todo Add comments for methods.
*/
class Ar {
public: /* Ctors */
Ar(const char* path);
virtual ~Ar();
public: /* Interface */
virtual bool each_file(const char* /* path */, uint8_t*, long);
char* file_name(char* name, long* size);
bool open();
bool process();
bool validate();
public: /* Instance vars */
const char* path;
int fd;
private: /* Disallowed */
Ar(const Ar& other);
Ar& operator=(Ar& other);
};
inline bool Ar::each_file(const char* /* path */, uint8_t*, long) {
return true;
}
}
#endif