}
nonstd::expected<void, std::string>
-write_file(const std::string& path, const util::Blob& data)
+write_file(const std::string& path, nonstd::span<const uint8_t> data)
{
Fd fd(open(path.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666));
if (!fd) {
#include <util/types.hpp>
#include <third_party/nonstd/expected.hpp>
+#include <third_party/nonstd/span.hpp>
#include <ctime>
#include <optional>
const std::string& data);
// Write binary `data` to `path`.
-nonstd::expected<void, std::string> write_file(const std::string& path,
- const util::Blob& data);
+nonstd::expected<void, std::string>
+write_file(const std::string& path, nonstd::span<const uint8_t> data);
} // namespace util