blob: 366b3f11631b11217ef29861c71e49d0966b22f3 (
plain) (
tree)
|
|
#ifndef DEF_VFS_VDIR_H
#define DEF_VFS_VDIR_H
#include "node.h"
#include <lib/earray.h>
#include <lib/std.h>
struct vdir_child {
char* name;
node *el;
vdir_child(char* na, node* nd) : el(nd) {
name = strdup(na);
}
};
class vdir : public node {
earray<vdir_child> children;
size_t child_count;
public:
vdir(node* parent);
virtual ~vdir();
virtual int read(size_t offset, size_t len, char* buffer);
virtual int write(size_t offset, size_t len, char* buffer); // rename file
virtual node* get_child(char* name);
virtual int add_child(char* name, node *child);
virtual size_t get_size();
};
#endif
|