30 FolderArchive(
const std::string& archivePath, std::shared_ptr<ResourceManager> resourceManager =
nullptr,
31 std::shared_ptr<Keystore> keystore =
nullptr);
52 bool WriteFile(
const std::string& filename,
const std::vector<uint8_t>& data);
59 std::shared_ptr<File>
LoadFile(
const std::string& filePath);
74 std::shared_ptr<File>
LoadFileRaw(
const std::string& filePath);
84 std::string mArchiveBasePath;
Abstract base class representing a mounted archive (OTR, O2R, or folder).
Definition Archive.h:61
Archive implementation backed by an on-disk directory tree.
Definition FolderArchive.h:24
FolderArchive(const std::string &archivePath, std::shared_ptr< ResourceManager > resourceManager=nullptr, std::shared_ptr< Keystore > keystore=nullptr)
Constructs a FolderArchive rooted at the given directory.
std::shared_ptr< File > LoadFile(uint64_t hash)
Loads a file by its 64-bit path hash.
std::shared_ptr< File > LoadFileRaw(const std::string &filePath)
Reads a file from disk without header parsing.
std::shared_ptr< File > LoadFileRaw(uint64_t hash)
Reads a file from disk by hash without header parsing.
std::shared_ptr< File > LoadFile(const std::string &filePath)
Loads a file by its virtual path relative to the archive root.
bool Close()
Closes the archive and clears the internal file index.
bool WriteFile(const std::string &filename, const std::vector< uint8_t > &data)
Writes raw data to a file inside the archive directory.
bool Open()
Scans the directory and indexes all files found within it.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14