moving along
[vrfileman] / src / fs.h
1 #ifndef FS_H_
2 #define FS_H_
3
4 #include <vector>
5 #include <stdlib.h>
6 #include "fspath.h"
7
8 enum FSNodeType {
9         FSTYPE_UNKNOWN,
10         FSTYPE_FILE,
11         FSTYPE_DIR,
12         FSTYPE_DEV
13 };
14
15 class FSNode {
16 public:
17         FSNodeType type;
18         FSPath path;
19         size_t size;
20
21         FSNode *parent;
22         std::vector<FSNode*> children;
23
24         FSNode();
25
26         bool expand();
27 };
28
29 bool init_fs();
30 void cleanup_fs();
31
32 void draw_fs();
33
34 FSNode *get_fsnode(const char *path);
35 FSNode *get_fsnode(const char *dir, const char *name);
36
37 #endif  // FS_H_