better icon placement
[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         int nfiles, ndirs;
24
25         FSNode();
26
27         bool expand();
28 };
29
30 bool init_fs();
31 void cleanup_fs();
32
33 void draw_fs();
34
35 FSNode *get_fsnode(const char *path);
36 FSNode *get_fsnode(const char *dir, const char *name);
37
38 #endif  // FS_H_