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