projects
/
vrfileman
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
implemented a laser pointer
[vrfileman]
/
src
/
fs.h
diff --git
a/src/fs.h
b/src/fs.h
index
c6f95a7
..
4174bb1
100644
(file)
--- a/
src/fs.h
+++ b/
src/fs.h
@@
-1,28
+1,41
@@
#ifndef FS_H_
#define FS_H_
#ifndef FS_H_
#define FS_H_
+#include <stdlib.h>
+#include <vector>
+#include <string>
+#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;
+ std::string short_name;
+ std::vector<std::string> name_lines;
+ size_t size;
+
+ FSNode *parent;
+ std::vector<FSNode*> children;
+ int nfiles, ndirs;
FSNode();
FSNode();
- ~FSNode();
- void set_path(const char *s);
+ bool expand();
};
};
-bool init_fs();
+bool init_fs(const char *path = 0);
void cleanup_fs();
void draw_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_