1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-30 06:45:43 +00:00
Aquaria/ExternalLibs/ttvfs/VFSDirView.h

42 lines
851 B
C
Raw Normal View History

2014-04-06 17:19:33 +00:00
#ifndef VFS_DIR_VIEW_H
#define VFS_DIR_VIEW_H
#include <vector>
#include "VFSDir.h"
VFS_NAMESPACE_START
class InternalDir;
class File;
class DirView : public DirBase
{
public:
DirView();
2014-04-07 00:25:58 +00:00
virtual ~DirView();
2014-04-06 17:19:33 +00:00
void init(const char *);
void add(DirBase *);
2014-04-07 00:25:58 +00:00
File *getFileByName(const char *fn, bool lazyLoad = true);
void forEachDir(DirEnumCallback f, void *user = NULL, bool safe = false);
void forEachFile(FileEnumCallback f, void *user = NULL, bool safe = false);
File *getFileFromSubdir(const char *subdir, const char *file);
2014-04-06 17:19:33 +00:00
2014-04-07 00:25:58 +00:00
const char *getType() const { return "DirView"; }
DirBase *createNew(const char *dir) const { return NULL; }
2014-04-06 17:19:33 +00:00
bool _addToView(char *path, DirView& view);
protected:
typedef std::vector<CountedPtr<DirBase> > ViewList;
ViewList _view;
};
VFS_NAMESPACE_END
#endif