| 81 | } |
| 82 | |
| 83 | void FindAllDiffsInDirectory(string const & dir, std::vector<LocalCountryFile> & diffs) |
| 84 | { |
| 85 | Platform & platform = GetPlatform(); |
| 86 | |
| 87 | Platform::TFilesWithType files; |
| 88 | platform.GetFilesByType(dir, Platform::EFileType::Regular, files); |
| 89 | |
| 90 | for (auto const & fileWithType : files) |
| 91 | { |
| 92 | string name = fileWithType.first; |
| 93 | |
| 94 | auto const isDiffReady = name.ends_with(DIFF_FILE_EXTENSION READY_FILE_EXTENSION); |
| 95 | auto const isDiff = name.ends_with(DIFF_FILE_EXTENSION); |
| 96 | |
| 97 | if (!isDiff && !isDiffReady) |
| 98 | continue; |
| 99 | |
| 100 | base::GetNameWithoutExt(name); |
| 101 | if (isDiffReady) |
| 102 | base::GetNameWithoutExt(name); |
| 103 | |
| 104 | diffs.emplace_back(dir, CountryFile(std::move(name)), 0 /* version */); |
| 105 | } |
| 106 | } |
| 107 | } // namespace |
| 108 | |
| 109 | string GetFilePath(int64_t version, string const & dataDir, string const & countryName, MapFileType type) |
no test coverage detected