FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
ns_reserved::ns_bind Namespace Reference

Bind mount configuration storage in reserved space. More...

Functions

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.
 

Detailed Description

Bind mount configuration storage in reserved space.

This namespace manages bind mount configurations stored as a JSON string in the binary's reserved space. It stores mappings between host paths and container paths, allowing specific directories or files from the host system to be made available inside the containerized environment. Bind mounts can be read-only or read-write and are applied at runtime during container initialization.

Function Documentation

◆ read()

Value< std::string > ns_reserved::ns_bind::read ( fs::path const & path_file_binary)
inline

Reads the bindings json string from the target binary.

Parameters
path_file_binaryTarget binary to write the json string
Returns
On success it returns the read data, or the respective error message

Definition at line 65 of file bind.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

Value< void > ns_reserved::ns_bind::write ( fs::path const & path_file_binary,
std::string_view const & json )
inline

Writes the bindings json string to the target binary.

Parameters
path_file_binaryTarget binary to write the json string
jsonJson string to write to the target file as binary data
Returns
Value<void> Nothing on success, or the respective error message

Definition at line 45 of file bind.hpp.

Here is the call graph for this function:
Here is the caller graph for this function: