X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=vrfileman;a=blobdiff_plain;f=src%2Ffs.h;h=4174bb16cb321e6d418ee1ff7d35aaffd711a567;hp=d58c621fd8c902b52b2329539776a083eb752169;hb=1c2b18e725db9e066d5dcb11123fc2019aec2ee7;hpb=d0cc9ec2f92f149279ebc8f1c29d2be627074488 diff --git a/src/fs.h b/src/fs.h index d58c621..4174bb1 100644 --- a/src/fs.h +++ b/src/fs.h @@ -1,20 +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(); - void set_path(const char *s); + bool expand(); }; +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_