1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-16 14:50:01 +00:00
Aquaria/ExternalLibs/ttvfs_zip/VFSZipArchiveLoader.cpp

19 lines
459 B
C++
Raw Normal View History

#include "VFSInternal.h"
#include "VFSZipArchiveLoader.h"
#include "VFSDirZip.h"
2014-04-06 17:19:33 +00:00
#include "VFSZipArchiveRef.h"
VFS_NAMESPACE_START
2014-04-06 17:19:33 +00:00
Dir *VFSZipArchiveLoader::Load(File *arch, VFSLoader ** /*unused*/, void * /*unused*/)
{
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;
}
VFS_NAMESPACE_END