| 106 | } |
| 107 | |
| 108 | CASC::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 | |
| 118 | CASC::~CASC() { CascCloseStorage(_storage); } |
| 119 |
nothing calls this directly
no outgoing calls
no test coverage detected