34namespace fs = std::filesystem;
45inline Value<void> write(fs::path
const& path_file_binary, std::string_view
const& json)
47 uint64_t space_available = ns_reserved::FIM_RESERVED_OFFSET_BINDINGS_END - ns_reserved::FIM_RESERVED_OFFSET_BINDINGS_BEGIN;
48 uint64_t space_required = json.size();
49 return_if(space_available <= space_required, Error(
"E::Not enough space to fit json data"));
51 , FIM_RESERVED_OFFSET_BINDINGS_BEGIN
52 , FIM_RESERVED_OFFSET_BINDINGS_END
67 uint64_t offset_begin = ns_reserved::FIM_RESERVED_OFFSET_BINDINGS_BEGIN;
68 uint64_t size = ns_reserved::FIM_RESERVED_OFFSET_BINDINGS_END - offset_begin;
69 auto buffer = std::make_unique<char[]>(size);
Enhanced error handling framework built on std::expected.
Simplified macros for common control flow patterns with optional logging.
Bind mount configuration storage in reserved space.
Value< void > write(fs::path const &path_file_binary, std::string_view const &json)
Writes the bindings json string to the target binary.
Value< std::string > read(fs::path const &path_file_binary)
Reads the bindings json string from the target binary.
Value< void > write(fs::path const &path_file_binary, uint64_t offset_begin, uint64_t offset_end, const char *data, uint64_t length) noexcept
Writes data to a file in binary format.
Value< std::streamsize > read(fs::path const &path_file_binary, uint64_t offset, char *data, uint64_t length) noexcept
Reads data from a file in binary format.
Enhanced expected type with integrated logging capabilities.