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

Function DoStorageSearch_RootFile

src/External/CascLib/src/CascFindFile.cpp:103–125  ·  view source on GitHub ↗

Perform searching using root-specific provider. The provider may need the listfile

Source from the content-addressed store, hash-verified

101// Perform searching using root-specific provider.
102// The provider may need the listfile
103static bool DoStorageSearch_RootFile(TCascSearch * pSearch, PCASC_FIND_DATA pFindData)
104{
105 PCASC_CKEY_ENTRY pCKeyEntry;
106 TCascStorage * hs = pSearch->hs;
107
108 // Reset the search structure
109 ResetFindData(pFindData);
110
111 // Enumerate over all files
112 for(;;)
113 {
114 // Attempt to find (the next) file from the root handler
115 pCKeyEntry = hs->pRootHandler->Search(pSearch, pFindData);
116 if(pCKeyEntry == NULL)
117 return false;
118
119 // The entry is expected to be referenced by the root directory
120 assert(pCKeyEntry->RefCount != 0);
121
122 // Copy the CKey entry to the find data and return it
123 return CopyCKeyEntryToFindData(pFindData, pCKeyEntry);
124 }
125}
126
127static bool DoStorageSearch_CKey(TCascSearch * pSearch, PCASC_FIND_DATA pFindData)
128{

Callers 1

DoStorageSearchFunction · 0.85

Calls 3

ResetFindDataFunction · 0.85
CopyCKeyEntryToFindDataFunction · 0.85
SearchMethod · 0.45

Tested by

no test coverage detected