MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / getAllFiles

Method getAllFiles

Source/3rdParty/Zip/ZipUtils.cpp:169–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169std::list<std::string> ZipFile::getAllFiles(const std::string& path) {
170 if (!_file) return {};
171 std::string searchName = getSearchName(path);
172 std::list<std::string> results;
173 for (const auto& file : _file->fileList) {
174 if (isDirectChildPath(file.first, searchName)) {
175 size_t searchStart = 0;
176 if (!searchName.empty()) searchStart = searchName.length() + 1;
177 results.push_back(file.second.name.substr(searchStart));
178 }
179 }
180 return results;
181}
182
183bool ZipFile::fileExists(const std::string& fileName) const {
184 if (!_file) return false;

Callers

nothing calls this directly

Calls 6

getSearchNameFunction · 0.85
isDirectChildPathFunction · 0.85
substrMethod · 0.65
emptyMethod · 0.45
lengthMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected