|
| constexpr std::string_view | getGUID () const override |
| | Get the GUID corresponding to the pack file type.
|
| |
| constexpr bool | hasEntryChecksums () const override |
| | Returns true if the format has a checksum for each entry.
|
| |
| std::vector< std::string > | verifyEntryChecksums () const override |
| | Verify the checksums of each file, if a file fails the check its path will be added to the vector If there is no checksum ability in the format, it will return an empty vector.
|
| |
| constexpr bool | isCaseSensitive () const override |
| | Does the format support case-sensitive file names?
|
| |
| std::optional< std::vector< std::byte > > | readEntry (const std::string &path_) const override |
| | Try to read the entry's data to a bytebuffer.
|
| |
| Attribute | getSupportedEntryAttributes () const override |
| | Returns a list of supported entry attributes Mostly for GUI programs that show entries and their metadata in a table ;)
|
| |
| | operator std::string () const override |
| |
| uint32_t | getVersion () const |
| |
| uint32_t | getAppID () const |
| |
| uint32_t | getAppVersion () const |
| |
| constexpr bool | isReadOnly () const noexcept final |
| |
| | operator std::string () const override |
| |
| | PackFile (const PackFile &other)=delete |
| |
| PackFile & | operator= (const PackFile &other)=delete |
| |
| | PackFile (PackFile &&other) noexcept=default |
| |
| PackFile & | operator= (PackFile &&other) noexcept=default |
| |
| virtual | ~PackFile ()=default |
| |
| virtual constexpr std::string_view | getGUID () const =0 |
| | Get the GUID corresponding to the pack file type.
|
| |
template<typename T >
requires requires (const T&) {{T::GUID} -> std::convertible_to<std::string_view>;} |
| bool | isInstanceOf () const |
| | Check if the pack file is an instance of the given pack file class.
|
| |
| virtual constexpr bool | hasEntryChecksums () const |
| | Returns true if the format has a checksum for each entry.
|
| |
| virtual std::vector< std::string > | verifyEntryChecksums () const |
| | Verify the checksums of each file, if a file fails the check its path will be added to the vector If there is no checksum ability in the format, it will return an empty vector.
|
| |
| virtual bool | hasPackFileChecksum () const |
| | Returns true if the entire file has a checksum.
|
| |
| virtual bool | verifyPackFileChecksum () const |
| | Verify the checksum of the entire file, returns true on success Will return true if there is no checksum ability in the format.
|
| |
| virtual bool | hasPackFileSignature () const |
| | Returns true if the file is signed.
|
| |
| virtual bool | verifyPackFileSignature () const |
| | Verify the file signature, returns true on success Will return true if there is no signature ability in the format.
|
| |
| virtual constexpr bool | isCaseSensitive () const |
| | Does the format support case-sensitive file names?
|
| |
| bool | hasEntry (const std::string &path, bool includeUnbaked=true) const |
| | Check if an entry exists given the file path.
|
| |
| std::optional< Entry > | findEntry (const std::string &path_, bool includeUnbaked=true) const |
| | Try to find an entry given the file path.
|
| |
| virtual std::optional< std::vector< std::byte > > | readEntry (const std::string &path_) const =0 |
| | Try to read the entry's data to a bytebuffer.
|
| |
| std::optional< std::vector< std::byte > > | operator[] (const std::string &path_) const |
| |
| std::optional< std::string > | readEntryText (const std::string &path) const |
| | Try to read the entry's data to a string.
|
| |
| virtual constexpr bool | isReadOnly () const noexcept |
| |
| void | addEntry (const std::string &entryPath, const std::string &filepath, EntryOptions options={}) |
| | Add a new entry from a file path - the first parameter is the path in the PackFile, the second is the path on disk.
|
| |
| void | addEntry (const std::string &path, std::vector< std::byte > &&buffer, EntryOptions options={}) |
| | Add a new entry from a buffer.
|
| |
| void | addEntry (const std::string &path, std::span< const std::byte > buffer, EntryOptions options={}) |
| | Add a new entry from a buffer.
|
| |
| void | addDirectory (const std::string &entryBaseDir, const std::string &dir, EntryOptions options={}) |
| | Adds new entries using the contents of a given directory.
|
| |
| void | addDirectory (const std::string &entryBaseDir_, const std::string &dir, const EntryCreation &creation) |
| | Adds new entries using the contents of a given directory.
|
| |
| virtual bool | renameEntry (const std::string &oldPath_, const std::string &newPath_) |
| | Rename an existing entry.
|
| |
| virtual bool | renameDirectory (const std::string &oldDir_, const std::string &newDir_) |
| | Rename an existing directory.
|
| |
| virtual bool | removeEntry (const std::string &path_) |
| | Remove an entry.
|
| |
| virtual std::size_t | removeDirectory (const std::string &dirName_) |
| | Remove a directory.
|
| |
| virtual bool | bake (const std::string &outputDir_, BakeOptions options, const EntryCallback &callback)=0 |
| | If output folder is an empty string, it will overwrite the original.
|
| |
| bool | extractEntry (const std::string &entryPath, const std::string &filepath) const |
| | Extract the given entry to disk at the given file path.
|
| |
| bool | extractDirectory (const std::string &dir_, const std::string &outputDir) const |
| | Extract the given directory to disk under the given output directory.
|
| |
| bool | extractAll (const std::string &outputDir, bool createUnderPackFileDir=true) const |
| | Extract the contents of the pack file to disk at the given directory.
|
| |
| bool | extractAll (const std::string &outputDir, const EntryPredicate &predicate, bool stripSharedDirs=true) const |
| | Extract the contents of the pack file to disk at the given directory - only entries which match the predicate are extracted.
|
| |
| const EntryTrie & | getBakedEntries () const |
| | Get entries saved to disk.
|
| |
| const EntryTrie & | getUnbakedEntries () const |
| | Get entries that have been added but not yet baked.
|
| |
| std::size_t | getEntryCount (bool includeUnbaked=true) const |
| | Get the number of entries in the pack file.
|
| |
| void | runForAllEntries (const EntryCallback &operation, bool includeUnbaked=true) const |
| | Run a callback for each entry in the pack file.
|
| |
| void | runForAllEntries (const std::string &parentDir, const EntryCallback &operation, bool recursive=true, bool includeUnbaked=true) const |
| | Run a callback for each entry in the pack file under the parent directory.
|
| |
| std::string_view | getFilepath () const |
| | /home/user/pak01_dir.vpk
|
| |
| std::string | getTruncatedFilepath () const |
| | /home/user/pak01_dir.vpk -> /home/user/pak01
|
| |
| std::string | getFilename () const |
| | /home/user/pak01_dir.vpk -> pak01_dir.vpk
|
| |
| std::string | getTruncatedFilename () const |
| | /home/user/pak01_dir.vpk -> pak01.vpk
|
| |
| std::string | getFilestem () const |
| | /home/user/pak01_dir.vpk -> pak01_dir
|
| |
| virtual std::string | getTruncatedFilestem () const |
| | /home/user/pak01_dir.vpk -> pak01
|
| |
| virtual Attribute | getSupportedEntryAttributes () const |
| | Returns a list of supported entry attributes Mostly for GUI programs that show entries and their metadata in a table ;)
|
| |
| virtual | operator std::string () const |
| |
Definition at line 9 of file GCF.h.