1#ifndef SOURCEMETA_CORE_IO_ATOMIC_H_
2#define SOURCEMETA_CORE_IO_ATOMIC_H_
4#ifndef SOURCEMETA_CORE_IO_EXPORT
5#include <sourcemeta/core/io_export.h>
15namespace sourcemeta::core {
26SOURCEMETA_CORE_IO_EXPORT
28 const std::string_view contents) -> void;
42SOURCEMETA_CORE_IO_EXPORT
44 const std::span<const std::byte> contents) -> void;
60SOURCEMETA_CORE_IO_EXPORT
62 const std::function<
void(std::ostream &)> &writer)
79SOURCEMETA_CORE_IO_EXPORT
81 const std::filesystem::path &replacement) -> void;
SOURCEMETA_CORE_IO_EXPORT auto atomic_write_file(const std::filesystem::path &path, const std::string_view contents) -> void
SOURCEMETA_CORE_IO_EXPORT auto atomic_directory_swap(const std::filesystem::path &original, const std::filesystem::path &replacement) -> void