| 167 | } |
| 168 | |
| 169 | std::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 | |
| 183 | bool ZipFile::fileExists(const std::string& fileName) const { |
| 184 | if (!_file) return false; |
nothing calls this directly
no test coverage detected