15 [[nodiscard]] std::optional<std::string>
readFile(
const std::filesystem::path& path);
18 bool writeFile(
const std::filesystem::path& path, std::string_view content);
21 bool appendFile(
const std::filesystem::path& path, std::string_view content);
Portable access to system information, environment variables, files and paths.
Definition Environment.hpp:7
std::optional< std::string > readFile(const std::filesystem::path &path)
Content of the file, or std::nullopt if it cannot be read.
bool writeFile(const std::filesystem::path &path, std::string_view content)
Creates or replaces the file with content; returns false on failure.
bool appendFile(const std::filesystem::path &path, std::string_view content)
Appends content to the file, creating it if needed; returns false on failure.