FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
ns_config::Flags Struct Reference

Runtime feature flags. More...

#include <config.hpp>

Static Public Member Functions

static Value< Flagscreate (fs::path const &path_bin_self)
 Factory method to create Flags.
 

Public Attributes

bool is_root
 Execute as root (UID=0)? Checked via FIM_ROOT env or stored UID.
 
bool is_debug
 Enable debug logging? Set via FIM_DEBUG=1.
 
bool is_casefold
 Enable case-insensitive filesystem? Via FIM_CASEFOLD or reserved space.
 
bool is_notify
 Show desktop notifications? Stored in reserved space.
 

Detailed Description

Runtime feature flags.

Controls FlatImage behavior through environment variables and reserved space:

Flag resolution priority (highest to lowest):

  1. Environment variables (FIM_ROOT, FIM_DEBUG, FIM_CASEFOLD)
  2. Reserved space configuration (casefold, notify)
  3. Binary environment database (UID check for root)
Note
All flags are immutable after creation

Definition at line 475 of file config.hpp.

Member Function Documentation

◆ create()

static Value< Flags > ns_config::Flags::create ( fs::path const & path_bin_self)
inlinestatic

Factory method to create Flags.

Resolves flags from multiple sources in priority order:

  • is_root: FIM_ROOT env → binary UID database
  • is_debug: FIM_DEBUG env
  • is_casefold: FIM_CASEFOLD env → reserved space
  • is_notify: reserved space only
Parameters
path_bin_selfPath to FlatImage binary
Returns
Value<Flags> Initialized flags or error

Definition at line 498 of file config.hpp.

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

Member Data Documentation

◆ is_casefold

bool ns_config::Flags::is_casefold

Enable case-insensitive filesystem? Via FIM_CASEFOLD or reserved space.

Definition at line 483 of file config.hpp.

◆ is_debug

bool ns_config::Flags::is_debug

Enable debug logging? Set via FIM_DEBUG=1.

Definition at line 482 of file config.hpp.

◆ is_notify

bool ns_config::Flags::is_notify

Show desktop notifications? Stored in reserved space.

Definition at line 484 of file config.hpp.

◆ is_root

bool ns_config::Flags::is_root

Execute as root (UID=0)? Checked via FIM_ROOT env or stored UID.

Definition at line 481 of file config.hpp.


The documentation for this struct was generated from the following file: