OXY-SYNC-CONTAINER 1.0
OXY-SYNC-CONTAINER Library Documentation
Loading...
Searching...
No Matches
oxy::sync::settings::load_fn Struct Reference

Function object to load settings from an INI configuration file. More...

#include <settings.h>

Public Member Functions

settings_t operator() (std::filesystem::path const &file) const

Detailed Description

Function object to load settings from an INI configuration file.

This function object takes a filesystem path to an INI file, reads the configuration settings, and populates a settings_t instance with the values. If the file does not exist, it returns the default settings. It also expands any environment variables in the paths.

Member Function Documentation

◆ operator()()

settings_t oxy::sync::settings::load_fn::operator() ( std::filesystem::path const & file) const
inline
Parameters
file- The filesystem path to the INI configuration file.
Returns
A settings_t instance populated with the configuration settings from the file, or default settings if the file does not exist.

References oxy::sync::settings::expand, and oxy::sync::settings::remove_quote.