#ifndef DEF_VFS_VDIR_H #define DEF_VFS_VDIR_H #include "node.h" #include #include struct vdir_child { char* name; node *el; vdir_child(char* na, node* nd) : el(nd) { name = strdup(na); } virtual ~vdir_child() { free(name); } }; class vdir : public node { earray 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