#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <functional>
#include <memory>
#include <optional>
#include <span>
#include <string_view>
#include <vector>
Go to the source code of this file.
|
| std::optional< std::vector< std::uint8_t > > | coastline::ReadSaveFile (const std::filesystem::path &path, std::size_t limit) |
| | Read a complete regular file without allocating beyond a caller-supplied limit.
|
| bool | coastline::WriteSaveFile (const std::filesystem::path &path, std::span< const std::uint8_t > bytes) |
| | Lock and atomically replace a binary save.
|
| bool | coastline::WriteSaveFile (const std::filesystem::path &path, std::string_view text) |
| | Lock and atomically replace a text save.
|
| std::optional< std::vector< std::uint8_t > > | coastline::ReadVerifiedSaveFile (const std::filesystem::path &path, std::size_t limit, bool resetInvalid=true, const SavePayloadValidator &validate={}) |
| | Read an internal binary save with its format signature, payload length, and SHA-1 checksum.
|
| bool | coastline::WriteVerifiedSaveFile (const std::filesystem::path &path, std::span< const std::uint8_t > bytes) |
| | Atomically write an internal binary save with a format signature, length, and SHA-1 checksum.
|