1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-12-29 00:05:50 +00:00
Aquaria/ExternalLibs/ttvfs_zip/VFSZipArchiveLoader.cpp
2014-04-06 19:19:33 +02:00

18 lines
459 B
C++

#include "VFSInternal.h"
#include "VFSZipArchiveLoader.h"
#include "VFSDirZip.h"
#include "VFSZipArchiveRef.h"
VFS_NAMESPACE_START
Dir *VFSZipArchiveLoader::Load(File *arch, VFSLoader ** /*unused*/, void * /*unused*/)
{
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