17 bool isWmoGroup(std::string_view canonical) {
18 const std::size_t stemEnd = canonical.size() - 4;
19 return stemEnd >= 4 && canonical[stemEnd - 4] ==
'_' &&
20 std::isdigit(
static_cast<unsigned char>(canonical[stemEnd - 3])) &&
21 std::isdigit(
static_cast<unsigned char>(canonical[stemEnd - 2])) && std::isdigit(
22 static_cast<unsigned char>(canonical[stemEnd - 1]));
27 bool isAuxWdt(std::string_view stem) {
28 for (
const std::string_view suffix : {
"_occ",
"_lgt",
"_fogs",
"_mpv",
"_tex",
"_wmo",
"_psd",
"_pd4"})
29 if (stem.ends_with(suffix))
return true;
35 bool isAdtSplitFile(std::string_view stem) {
36 for (
const std::string_view suffix : {
"_tex0",
"_tex1",
"_obj0",
"_obj1",
"_lod"})
37 if (stem.ends_with(suffix))
return true;
45 const std::string_view view{canonical};
47 if (view.ends_with(
".wmo")) {
51 const std::string_view stem = view.substr(0, view.size() - 4);
52 if (
const auto lod = stem.rfind(
"_lod"); lod != std::string_view::npos && lod + 4 < stem.size() &&
53 std::ranges::all_of(stem.substr(lod + 4), [](
char c) {
54 return std::isdigit(static_cast<unsigned char>(c));
65 if (view.ends_with(
".wdt")) {
74 if (view.ends_with(
".adt")) {
Internals of the round-trip audit (namespace wowlib::audit::detail): the per-format driver class — on...
RoundtripReport skipped(std::string_view reason)
A skipped outcome — ok, tagged with the reason.
std::string normalizePath(std::string_view path)
Canonicalize a client-internal file path.
Client-internal path canonicalization.
The round-trip audit surface (namespace wowlib::audit): one welded entry point that read->write->comp...
static RoundtripReport roundtrip(fs::FileSystem &fs, std::string_view path, ClientVersion version)