-// Copyright (C) 2022-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2022-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <cstring>
+namespace fs = util::filesystem;
+
namespace {
const size_t k_static_header_fields_size =
parse(data);
}
-CacheEntry::Header::Header(const std::string& path)
+CacheEntry::Header::Header(const fs::path& path)
{
parse(util::value_or_throw<core::Error>(
util::read_file_part<util::Bytes>(path, 0, 1000)));
-// Copyright (C) 2021-2022 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2024 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <third_party/nonstd/span.hpp>
#include <cstdint>
+#include <filesystem>
#include <functional>
#include <string>
public:
Header(const Config& config, CacheEntryType entry_type);
explicit Header(nonstd::span<const uint8_t> data);
- explicit Header(const std::string& path);
+ explicit Header(const std::filesystem::path& path);
std::string inspect() const;