MCPcopy Create free account
hub / github.com/AbyssEngine/AbyssEngineOld / CASC

Method CASC

src/Abyss/FileSystem/CASC.cpp:108–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108CASC::CASC(const std::filesystem::path &cascPath) {
109 const std::string path = std::filesystem::absolute(cascPath).string();
110 CASC_OPEN_STORAGE_ARGS args = {};
111 args.Size = sizeof(CASC_OPEN_STORAGE_ARGS);
112 args.PfnProgressCallback = casc_progress_callback;
113 if (!CascOpenStorageEx(path.c_str(), &args, 0, &_storage)) {
114 throw std::runtime_error(fmt::format("Error occurred while opening CASC {}: {}", cascPath.string(), GetCascError()));
115 }
116}
117
118CASC::~CASC() { CascCloseStorage(_storage); }
119

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected