170std::vector<boost::filesystem::path>
ResolveArchiveFileList(std::string_view inputPath, std::string_view localeName, std::string_view namePattern)
172 boost::filesystem::path path =
Trinity::StringFormat(fmt::runtime(namePattern), fmt::arg(
"installDir", inputPath), fmt::arg(
"locale", localeName));
173 std::vector<boost::filesystem::path> absolutePaths;
175 std::string fileNamePattern = path.filename().string();
176 if (fileNamePattern.find(
'?') != std::string::npos)
179 boost::system::error_code ec;
180 for (boost::filesystem::directory_entry
const& dirEntry : boost::filesystem::directory_iterator(path.parent_path(), ec))
185 absolutePaths.push_back(dirEntry.path().lexically_normal().make_preferred());
188 std::ranges::sort(absolutePaths, [](boost::filesystem::path
const& left, boost::filesystem::path
const& right)
190 return std::ranges::lexicographical_compare(left.string(), right.string(), std::ranges::greater(),
charToLower,
charToLower);
194 absolutePaths.push_back(path.lexically_normal().make_preferred());
196 return absolutePaths;
202 for (boost::filesystem::path
const& fileName : fileNames)
204 if (!exists(fileName))
216 catch (std::exception
const& e)
218 printf(
"%s\n", e.what());