#ifndef __C_MOUNT_READER_H_INCLUDED__
#define __C_MOUNT_READER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
#include "IFileSystem.h"
#include "CFileList.h"
namespace irr
{
namespace io
{
class CArchiveLoaderMount : public IArchiveLoader
{
public:
CArchiveLoaderMount(io::IFileSystem* fs);
virtual bool isALoadableFileFormat(const io::path& filename) const;
virtual bool isALoadableFileFormat(io::IReadFile* file) const;
virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const;
virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const;
virtual IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const;
private:
io::IFileSystem* FileSystem;
};
class CMountPointReader : public virtual IFileArchive, virtual CFileList
{
public:
CMountPointReader(IFileSystem *parent, const io::path& basename,
bool ignoreCase, bool ignorePaths);
virtual IReadFile* createAndOpenFile(u32 index);
virtual IReadFile* createAndOpenFile(const io::path& filename);
virtual const IFileList* getFileList() const;
virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_FOLDER; }
private:
core::array<io::path> RealFileNames;
IFileSystem *Parent;
void buildDirectory();
};
}
}
#endif
#endif