projects
/
vrfileman
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moving along
[vrfileman]
/
src
/
fs.h
diff --git
a/src/fs.h
b/src/fs.h
index
d58c621
..
6c7b406
100644
(file)
--- a/
src/fs.h
+++ b/
src/fs.h
@@
-1,20
+1,37
@@
#ifndef FS_H_
#define FS_H_
#ifndef FS_H_
#define FS_H_
+#include <vector>
+#include <stdlib.h>
+#include "fspath.h"
+
enum FSNodeType {
enum FSNodeType {
- FSNODE_UNKNOWN,
- FSNODE_FILE,
- FSNODE_DIR,
- FSNODE_DEV
+ FSTYPE_UNKNOWN,
+ FSTYPE_FILE,
+ FSTYPE_DIR,
+ FSTYPE_DEV
};
class FSNode {
public:
FSNodeType type;
};
class FSNode {
public:
FSNodeType type;
- char *abs_path;
- char *name, *suffix;
+ FSPath path;
+ size_t size;
+
+ FSNode *parent;
+ std::vector<FSNode*> children;
+
+ FSNode();
- void set_path(const char *s);
+ bool expand();
};
};
+bool init_fs();
+void cleanup_fs();
+
+void draw_fs();
+
+FSNode *get_fsnode(const char *path);
+FSNode *get_fsnode(const char *dir, const char *name);
+
#endif // FS_H_
#endif // FS_H_