moving along
[vrfileman] / src / fs.h
index c6f95a7..6c7b406 100644 (file)
--- a/src/fs.h
+++ b/src/fs.h
@@ -1,23 +1,29 @@
 #ifndef FS_H_
 #define FS_H_
 
+#include <vector>
+#include <stdlib.h>
+#include "fspath.h"
+
 enum FSNodeType {
-       FSNODE_UNKNOWN,
-       FSNODE_FILE,
-       FSNODE_DIR,
-       FSNODE_DEV
+       FSTYPE_UNKNOWN,
+       FSTYPE_FILE,
+       FSTYPE_DIR,
+       FSTYPE_DEV
 };
 
 class FSNode {
 public:
        FSNodeType type;
-       char *abs_path;
-       char *name, *suffix;
+       FSPath path;
+       size_t size;
+
+       FSNode *parent;
+       std::vector<FSNode*> children;
 
        FSNode();
-       ~FSNode();
 
-       void set_path(const char *s);
+       bool expand();
 };
 
 bool init_fs();
@@ -25,4 +31,7 @@ void cleanup_fs();
 
 void draw_fs();
 
+FSNode *get_fsnode(const char *path);
+FSNode *get_fsnode(const char *dir, const char *name);
+
 #endif // FS_H_