12#elif defined(__APPLE__)
14#elif defined(__linux__)
17 #warning "Unknown platform! Leaving the default platform blank..."
35 using SearchPathMapVPK = std::unordered_map<std::string, std::vector<std::unique_ptr<vpkpp::PackFile>>>;
52 [[nodiscard]]
static std::optional<FileSystem>
load(std::string_view gamePath,
const FileSystemOptions& options = {});
62 [[nodiscard]] std::optional<std::vector<std::byte>>
read(std::string_view filePath, std::string_view searchPath =
"GAME",
bool prioritizeVPKs =
true)
const;
64 [[nodiscard]] std::optional<std::vector<std::byte>>
readForMap(
const vpkpp::PackFile* map, std::string_view filePath, std::string_view searchPath =
"GAME",
bool prioritizeVPKs =
true)
const;
67 explicit FileSystem(std::string_view gamePath,
const FileSystemOptions& options = {});
static std::optional< FileSystem > load(steampp::AppID appID, std::string_view gameID, const FileSystemOptions &options={})
Creates a FileSystem based on a Steam installation.
std::optional< std::vector< std::byte > > readForMap(const vpkpp::PackFile *map, std::string_view filePath, std::string_view searchPath="GAME", bool prioritizeVPKs=true) const
const SearchPathMapVPK & getSearchPathVPKs() const
const SearchPathMapDir & getSearchPathDirs() const
std::unordered_map< std::string, std::vector< std::string > > SearchPathMapDir
std::unordered_map< std::string, std::vector< std::unique_ptr< vpkpp::PackFile > > > SearchPathMapVPK
std::optional< std::vector< std::byte > > read(std::string_view filePath, std::string_view searchPath="GAME", bool prioritizeVPKs=true) const
constexpr std::string_view DEFAULT_PLATFORM