X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=vrfileman;a=blobdiff_plain;f=src%2Ffs.h;h=4174bb16cb321e6d418ee1ff7d35aaffd711a567;hp=c6f95a7982b3f3cd67d5193e9f0164a27c4ad737;hb=1c2b18e725db9e066d5dcb11123fc2019aec2ee7;hpb=172da567dcbb634b13069e5c12ae8b6a9b3a29dc diff --git a/src/fs.h b/src/fs.h index c6f95a7..4174bb1 100644 --- a/src/fs.h +++ b/src/fs.h @@ -1,28 +1,41 @@ #ifndef FS_H_ #define FS_H_ +#include +#include +#include +#include "fspath.h" + enum FSNodeType { - FSNODE_UNKNOWN, - FSNODE_FILE, - FSNODE_DIR, - FSNODE_DEV + FSTYPE_UNKNOWN, + FSTYPE_FILE, + FSTYPE_DIR, + FSTYPE_DEV }; class FSNode { public: FSNodeType type; - char *abs_path; - char *name, *suffix; + FSPath path; + std::string short_name; + std::vector name_lines; + size_t size; + + FSNode *parent; + std::vector children; + int nfiles, ndirs; 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(); +FSNode *get_fsnode(const char *path); +FSNode *get_fsnode(const char *dir, const char *name); + #endif // FS_H_