MCPcopy Create free account
hub / github.com/Ahli/Galaxy-Observer-UI / GetFileInfo

Function GetFileInfo

tools/CascExtractor/CascExtractor/CascExtractor.cpp:200–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200static PCASC_FILE_SPAN_INFO GetFileInfo(HANDLE hFile, CASC_FILE_FULL_INFO& FileInfo) noexcept
201{
202 PCASC_FILE_SPAN_INFO pSpans = nullptr;
203 // Retrieve the full file info
204 if (CascGetFileInfo(hFile, CascFileFullInfo, &FileInfo, sizeof(CASC_FILE_FULL_INFO), nullptr)
205 && (pSpans = CASC_ALLOC<CASC_FILE_SPAN_INFO>(FileInfo.SpanCount)) != nullptr
206 && !CascGetFileInfo(hFile, CascFileSpanInfo, pSpans, FileInfo.SpanCount * sizeof(CASC_FILE_SPAN_INFO), nullptr))
207 {
208 CASC_FREE(pSpans);
209 pSpans = nullptr;
210 }
211 return pSpans;
212}
213
214static bool ExtractFile(HANDLE hStorage, const CASC_FIND_DATA& findData, const char* targetDirPath, const char* targetFilePath) {
215 namespace fs = std::filesystem;

Callers 1

ExtractFileFunction · 0.85

Calls 1

CASC_FREEFunction · 0.85

Tested by

no test coverage detected