|
| | 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.
|
| |
| | ~FolderArchive () |
| |
| bool | Open () |
| | Scans the directory and indexes all files found within it.
|
| |
| 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.
|
| |
| std::shared_ptr< File > | LoadFile (const std::string &filePath) |
| | Loads a file by its virtual path relative to the archive root.
|
| |
| std::shared_ptr< File > | LoadFile (uint64_t hash) |
| | Loads a file by its 64-bit path hash.
|
| |
| | Archive (const std::string &path, std::shared_ptr< ResourceManager > resourceManager=nullptr, std::shared_ptr< Keystore > keystore=nullptr) |
| | Constructs an Archive for the given filesystem path.
|
| |
| | ~Archive () |
| |
| bool | operator== (const Archive &rhs) const |
| | Two archives are equal when they refer to the same underlying path.
|
| |
| void | Load () |
| | Opens and indexes the archive, making its contents available for loading.
|
| |
| void | Unload () |
| | Closes the archive and releases all associated resources.
|
| |
| std::shared_ptr< std::unordered_map< uint64_t, std::string > > | ListFiles () |
| | Returns a map of all files indexed in this archive (hash → path).
|
| |
| std::shared_ptr< std::unordered_map< uint64_t, std::string > > | ListFiles (const std::string &filter) |
| | Returns only the files whose paths match the given filter string.
|
| |
| bool | HasFile (const std::string &filePath) |
| | Checks whether the archive contains a file at the given path.
|
| |
| bool | HasFile (uint64_t hash) |
| | Checks whether the archive contains a file with the given hash.
|
| |
| bool | HasGameVersion () |
| | Returns true if a game version value was found in the manifest.
|
| |
| uint32_t | GetGameVersion () |
| | Returns the game version encoded in the archive manifest.
|
| |
| const ArchiveManifest & | GetManifest () |
| | Returns the parsed archive manifest.
|
| |
| bool | IsSigned () |
| | Returns true if the archive carries a digital signature in its manifest.
|
| |
| bool | IsChecksumValid () |
| | Returns true if the archive's checksum field matches the computed checksum.
|
| |
| const std::string & | GetPath () |
| | Returns the filesystem path this archive was opened from.
|
| |
| bool | IsInitialized () |
| | Returns true if the archive has been successfully initialized/opened.
|
| |
|
| 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.
|
| |
| void | SetInitialized (bool isInitialized) |
| | Sets the initialized state flag. Called by Load() / Unload().
|
| |
| void | SetGameVersion (uint32_t gameVersion) |
| | Stores the game version parsed from the manifest.
|
| |
| void | IndexFile (const std::string &filePath) |
| | Adds a file to the internal hash→path index.
|
| |
| void | Validate () |
| | Validates the manifest checksum and signature, setting mIsSigned / mIsChecksumValid.
|
| |
Archive implementation backed by an on-disk directory tree.
FolderArchive treats an ordinary filesystem directory as a virtual archive. Files inside the directory are addressed by their relative paths, just like files inside an OTR or O2R archive. This makes it easy to load loose-file mods or development assets without packing them first.