2012-06-01 15:23:19 +00:00
|
|
|
#include "VFSInternal.h"
|
|
|
|
#include "VFSZipArchiveLoader.h"
|
|
|
|
#include "VFSDirZip.h"
|
2014-04-06 17:19:33 +00:00
|
|
|
#include "VFSZipArchiveRef.h"
|
2012-06-01 15:23:19 +00:00
|
|
|
|
|
|
|
VFS_NAMESPACE_START
|
|
|
|
|
2014-04-06 17:19:33 +00:00
|
|
|
Dir *VFSZipArchiveLoader::Load(File *arch, VFSLoader ** /*unused*/, void * /*unused*/)
|
2012-06-01 15:23:19 +00:00
|
|
|
{
|
2014-04-06 17:19:33 +00:00
|
|
|
CountedPtr<ZipArchiveRef> zref = new ZipArchiveRef(arch);
|
|
|
|
if(!zref->init() || !zref->openRead())
|
|
|
|
return NULL;
|
|
|
|
ZipDir *vd = new ZipDir(zref, arch->fullname(), true);
|
|
|
|
vd->load();
|
|
|
|
return vd;
|
2012-06-01 15:23:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
VFS_NAMESPACE_END
|