![]() |
SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
|
#include <fspp.h>
Public Types | |
| using | SearchPathMapDir = std::unordered_map<std::string, std::vector<std::string>> |
| using | SearchPathMapVPK = std::unordered_map<std::string, std::vector<std::unique_ptr<vpkpp::PackFile>>> |
Public Member Functions | |
| const SearchPathMapDir & | getSearchPathDirs () const |
| SearchPathMapDir & | getSearchPathDirs () |
| const SearchPathMapVPK & | getSearchPathVPKs () const |
| SearchPathMapVPK & | getSearchPathVPKs () |
| std::optional< std::vector< std::byte > > | read (std::string_view filePath, std::string_view searchPath="GAME", bool prioritizeVPKs=true) const |
| std::optional< std::vector< std::byte > > | readForMap (const vpkpp::PackFile *map, std::string_view filePath, std::string_view searchPath="GAME", bool prioritizeVPKs=true) const |
Static Public Member Functions | |
| static std::optional< FileSystem > | load (steampp::AppID appID, std::string_view gameID, const FileSystemOptions &options={}) |
| Creates a FileSystem based on a Steam installation. | |
| static std::optional< FileSystem > | load (std::string_view gamePath, const FileSystemOptions &options={}) |
| Creates a FileSystem based on a local installation. | |
Protected Member Functions | |
| FileSystem (std::string_view gamePath, const FileSystemOptions &options={}) | |
| using fspp::FileSystem::SearchPathMapDir = std::unordered_map<std::string, std::vector<std::string>> |
| using fspp::FileSystem::SearchPathMapVPK = std::unordered_map<std::string, std::vector<std::unique_ptr<vpkpp::PackFile>>> |
|
explicitprotected |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
staticnodiscard |
Creates a FileSystem based on a local installation.
| gamePath | The full path to the directory where gameinfo.txt is located (e.g. "path/to/portal2") |
| options | FileSystem creation options |
|
staticnodiscard |
Creates a FileSystem based on a Steam installation.
| appID | The AppID of the base game |
| gameID | The name of the directory where gameinfo.txt is located (e.g. "portal2") |
| options | FileSystem creation options |
|
nodiscard |
|
nodiscard |