1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-12-27 07:06:00 +00:00
Aquaria/ExternalLibs/ttvfs/VFSDirInternal.h

57 lines
1.2 KiB
C
Raw Normal View History

2014-04-06 17:19:33 +00:00
#ifndef VFS_DIR_INTERNAL_H
#define VFS_DIR_INTERNAL_H
#include "VFSDir.h"
#include <vector>
VFS_NAMESPACE_START
class Root;
class DirView;
// Internal class, not to be used outside
class InternalDir : public DirBase
{
friend class Root;
public:
bool fillView(const char *path, DirView& view);
// virtual overrides (final)
const char *getType() const { return "InternalDir"; }
void forEachFile(FileEnumCallback f, void *user = NULL, bool safe = false);
void forEachDir(DirEnumCallback f, void *user = NULL, bool safe = false);
File *getFileByName(const char *fn, bool lazyLoad = true);
DirBase *getDirByName(const char *fn, bool lazyLoad = true, bool useSubtrees = true);
2014-04-07 00:25:58 +00:00
File *getFileFromSubdir(const char *subdir, const char *file);
2014-04-06 17:19:33 +00:00
void close();
protected:
// virtual overrides(final)
InternalDir *createNew(const char *dir) const;
bool _addToView(char *path, DirView& view);
private:
InternalDir(const char *);
virtual ~InternalDir();
typedef std::vector<CountedPtr<DirBase> > MountedDirs;
MountedDirs _mountedDirs;
void _clearDirs();
void _clearMounts();
void _addMountDir(CountedPtr<DirBase> d);
void _removeMountDir(DirBase *d);
};
VFS_NAMESPACE_END
#endif