63 std::error_code error;
64 if (!fs::is_directory(root, error))
65 return MixField(FNV_OFFSET,
"フォルダが無い");
67 std::vector<std::pair<std::string, fs::path>> files;
68 for (fs::recursive_directory_iterator it(root, error), end; !error && it != end; it.increment(error)) {
69 std::error_code entryError;
70 if (!it->is_regular_file(entryError))
73 const std::u8string relative = it->path().lexically_relative(root).generic_u8string();
74 files.emplace_back(std::string(relative.begin(), relative.end()), it->path());
78 return MixField(FNV_OFFSET,
"フォルダを読めない");
80 std::ranges::sort(files);
81 uint64_t hash = FNV_OFFSET;
82 for (
const auto& [relative, path] : files) {
84 const std::string contents = ReadWhole(path, ok);
85 hash = MixField(hash, relative);
86 hash = MixField(hash, ok ? contents : std::string(
"読めない"));
152 if (loaded->tableVersion ==
m_current->tableVersion)
160 message += std::format(
"{}パッケージ {} を読まなかった: {}", message.empty() ?
"" :
" / ",
163 m_current = std::make_shared<const LoadedReactionTable>(std::move(*loaded));