blob: ffbccf9ba301426d30f78741b639fb38ccfb72e4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef DEF_VFS_VFILE_H
#define DEF_VFS_VFILE_H
#include <lib/std.h>
#include "node.h"
class vfile : public node {
char *data;
size_t size;
bool own_data; // did WE malloc the content of data ?
public:
vfile(node* parent, char* data = 0, size_t size = 0);
virtual ~vfile();
virtual int open(process *proc, int mode);
virtual int read(size_t offset, size_t len, char* buffer);
virtual int write(size_t offset, size_t len, char* buffer);
virtual size_t get_size() { return size; }
};
#endif
|