namespace core {
void
-ensure_dir_exists(std::string_view dir)
+ensure_dir_exists(const fs::path& dir)
{
if (auto result = fs::create_directories(dir); !result) {
throw core::Fatal(
#pragma once
+#include <filesystem>
#include <string>
#include <string_view>
namespace core {
// Like std::filesystem::create_directories but throws core::Fatal on error.
-void ensure_dir_exists(std::string_view dir);
+void ensure_dir_exists(const std::filesystem::path& dir);
// Send `text` to file descriptor `fd` (typically stdout or stderr, which
// potentially is connected to a console), optionally stripping ANSI color
-// Copyright (C) 2019-2022 Joel Rosdahl and other contributors
+// Copyright (C) 2019-2023 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <third_party/fmt/core.h>
#include <third_party/fmt/format.h>
+#include <third_party/fmt/std.h>
// Convenience macro for calling `fmt::format` with `FMT_STRING` around the
// format string literal.