| 147 | } |
| 148 | |
| 149 | size_t CascFileSystem::EnumerateFiles(const std::string& pattern, std::function<void(const std::string&, const size_t)> onFileFound) |
| 150 | { |
| 151 | size_t entriesConsumed = 0; |
| 152 | HANDLE fileHandle; |
| 153 | CASC_FIND_DATA findData; |
| 154 | |
| 155 | fileHandle = CascFindFirstFile(StorageHandle, pattern.c_str(), &findData, NULL); |
| 156 | |
| 157 | if (fileHandle != INVALID_HANDLE_VALUE) |
| 158 | { |
| 159 | do |
| 160 | { |
| 161 | if (findData.bFileAvailable) |
| 162 | { |
| 163 | if (findData.bFileAvailable) |
| 164 | { |
| 165 | onFileFound(findData.szFileName, findData.FileSize); |
| 166 | } |
| 167 | } |
| 168 | } while (CascFindNextFile(fileHandle, &findData)); |
| 169 | } |
| 170 | |
| 171 | CascFindClose(fileHandle); |
| 172 | |
| 173 | return false; |
| 174 | } |
nothing calls this directly
no test coverage detected