MCPcopy Create free account
hub / github.com/Scobalula/Greyhound / EnsureFileSpanFramesLoaded

Function EnsureFileSpanFramesLoaded

src/External/CascLib/src/CascReadFile.cpp:521–538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521static DWORD EnsureFileSpanFramesLoaded(TCascFile * hf)
522{
523 DWORD dwErrCode;
524
525 if(hf->ContentSize == CASC_INVALID_SIZE64 || hf->pFileSpan->pFrames == NULL)
526 {
527 // Load all frames of all file spans
528 dwErrCode = LoadFileSpanFrames(hf);
529 if(dwErrCode != ERROR_SUCCESS)
530 return dwErrCode;
531
532 // Now the content size must be known
533 if(hf->ContentSize == CASC_INVALID_SIZE64)
534 return ERROR_CAN_NOT_COMPLETE;
535 }
536
537 return ERROR_SUCCESS;
538}
539
540static DWORD DecodeFileFrame(
541 TCascFile * hf,

Callers 4

GetFileFullInfoFunction · 0.85
GetFileSpanInfoFunction · 0.85
CascGetFileSize64Function · 0.85
CascReadFileFunction · 0.85

Calls 1

LoadFileSpanFramesFunction · 0.85

Tested by

no test coverage detected