FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
ns_config::Path Class Reference

Defines all fundamental FlatImage paths. More...

#include <config.hpp>

Collaboration diagram for ns_config::Path:
[legend]

Classes

struct  Bin
 Paths to embedded and extracted binaries. More...
 
struct  Dir
 Directory paths used throughout FlatImage. More...
 
struct  File
 Instance-specific configuration files. More...
 

Static Public Member Functions

static Value< Pathcreate ()
 Factory method to create Path configuration.
 

Public Attributes

struct ns_config::Path::Dir dir
 
struct ns_config::Path::File file
 
struct ns_config::Path::Bin bin
 

Detailed Description

Defines all fundamental FlatImage paths.

Organizes paths into three categories: directories, files, and binaries. All paths are computed from the binary location and process ID.

FlatImage uses the following directory structure

/tmp/fim/ (global)
├── app/
│ └── {COMMIT}_{TIMESTAMP}/ (app)
│ ├── bin/ (app_bin)
│ │ ├── bash
│ │ ├── fim_janitor
│ │ ├── fim_portal
│ │ └── fim_portal_daemon
│ ├── sbin/ (app_sbin)
│ └── instance/
│ └── <PID>/ (instance)
│ ├── bashrc
│ ├── passwd
│ ├── portal/ (portal)
│ │ ├── daemon/
│ │ └── dispatcher/
│ ├── logs/
│ ├── mount/ (merged root)
│ └── layers/ (layer mounts)
│ ├── 0/
│ └── N/
└── run/ (runtime)
└── host/ (runtime_host)
{BINARY_DIR}/ (self)
└── .{BINARY_NAME}.data/ (host_data)
├── tmp/ (host_data_tmp)
├── work/<PID>/ (fuse work)
├── root/
├── casefold/
└── recipes/

Definition at line 142 of file config.hpp.

Member Function Documentation

◆ create()

static Value< Path > ns_config::Path::create ( )
inlinestatic

Factory method to create Path configuration.

Orchestrates initialization in the correct dependency order:

  1. Dir::create() - Computes and creates directory structure
  2. File::create() - Creates file paths based on instance directory
  3. Bin::create() - Creates binary paths based on app_bin directory
Returns
Value<Path> Initialized path configuration or error

Definition at line 257 of file config.hpp.

Here is the caller graph for this function:

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