UnixFileConfigBackend class final
#include <config/unix_file_backend.hpp>
Base classes
- class IConfigBackend
- Abstract storage backend used by
ConfigStore.
Constructors, destructors, conversion operators
- UnixFileConfigBackend(std::filesystem::path root_dir) explicit
Public functions
- auto read_file(std::string_view relative_path, std::vector<uint8_t>* out_bytes) -> ConfigReadStatus override
- Reads raw section payload bytes.
- auto remove_file(std::string_view relative_path) -> bool override
- Removes one persisted file.
- auto write_file_atomic(std::string_view relative_path, const std::vector<uint8_t>& bytes) -> bool override
- Writes bytes using backend-specific atomic replacement.
Function documentation
ConfigReadStatus prf:: config:: UnixFileConfigBackend:: read_file(std::string_view relative_path,
std::vector<uint8_t>* out_bytes) override
Reads raw section payload bytes.
| Parameters | |
|---|---|
| relative_path | Backend-relative file path, for example npr1.cbor. |
| out_bytes | Output byte buffer that receives file contents. |
| Returns | Ok when file was read, NotFound when file does not exist, or Error on storage failure. |
bool prf:: config:: UnixFileConfigBackend:: remove_file(std::string_view relative_path) override
Removes one persisted file.
Missing files should be treated as success by concrete backends.
bool prf:: config:: UnixFileConfigBackend:: write_file_atomic(std::string_view relative_path,
const std::vector<uint8_t>& bytes) override
Writes bytes using backend-specific atomic replacement.
The old content must remain intact when this method fails.