Some checks failed
Linux Build / Linux cpu (push) Has been cancelled
Linux Build / Linux cpu-clang (push) Has been cancelled
Linux Build / Linux vulkan (push) Has been cancelled
mac-build / macOS CPU (push) Has been cancelled
Nix Build / Nix (cpu) (push) Has been cancelled
Nix Build / Nix (vulkan) (push) Has been cancelled
windows-build / Windows CPU (push) Has been cancelled
27 lines
863 B
C++
27 lines
863 B
C++
#pragma once
|
|
|
|
#include <filesystem>
|
|
#include <optional>
|
|
#include <string>
|
|
#include <string_view>
|
|
#include <vector>
|
|
|
|
namespace engine::io {
|
|
|
|
bool is_existing_directory(const std::filesystem::path & path);
|
|
bool is_existing_file(const std::filesystem::path & path);
|
|
|
|
std::filesystem::path require_directory(const std::filesystem::path & path, std::string_view role);
|
|
std::filesystem::path require_file(const std::filesystem::path & path, std::string_view role);
|
|
|
|
std::optional<std::filesystem::path> find_first_existing(
|
|
const std::filesystem::path & root,
|
|
const std::vector<std::string> & relative_candidates);
|
|
|
|
std::vector<std::filesystem::path> collect_existing(
|
|
const std::filesystem::path & root,
|
|
const std::vector<std::string> & relative_candidates);
|
|
|
|
std::string read_text_file(const std::filesystem::path & path);
|
|
|
|
} // namespace engine::io
|