36 O2rArchive(
const std::string& archivePath, std::shared_ptr<ResourceManager> resourceManager =
nullptr,
37 std::shared_ptr<Keystore> keystore =
nullptr);
58 bool WriteFile(
const std::string& filename,
const std::vector<uint8_t>& data);
65 std::shared_ptr<File>
LoadFile(
const std::string& filePath);
76 zip_t* GetZipHandle();
78 void ReleaseZipHandle(zip_t* handle);
80 std::mutex mPoolMutex;
81 std::vector<zip_t*> mZipArchivePool;
Abstract base class representing a mounted archive (OTR, O2R, or folder).
Definition Archive.h:61
Archive implementation backed by a ZIP file (.o2r format).
Definition O2rArchive.h:30
O2rArchive(const std::string &archivePath, std::shared_ptr< ResourceManager > resourceManager=nullptr, std::shared_ptr< Keystore > keystore=nullptr)
Constructs an O2rArchive for the given ZIP file path.
std::shared_ptr< File > LoadFile(const std::string &filePath)
Loads a file from the archive by its virtual path.
bool Open()
Opens the ZIP file via libzip, creating the internal handle pool.
bool WriteFile(const std::string &filename, const std::vector< uint8_t > &data)
Writes raw data to a file entry inside the ZIP archive.
std::shared_ptr< File > LoadFile(uint64_t hash)
Loads a file from the archive by its 64-bit hash.
bool Close()
Closes all pooled handles and releases libzip resources.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14