Class ConfigFile¶
Defined in File config_file.h
Class Documentation¶
-
class ConfigFile¶
Utility to locate and monitor a configuration file via the XDG Base Directory Specification.
Vis: ($XDG_CONFIG_HOME or $HOME/.config followed by $XDG_CONFIG_DIRS). If, instead of a filename, a path is given, then the base directories are not applied.
If mode is
no_reloading
, then the file is loaded on startup and not reloadedIf mode is
reload_on_change
, then the file is loaded on startup and either the user-specific configuration file base ($XDG_CONFIG_HOME or $HOME/.config), or the supplied path is monitored for changes.Remark
MirAL 5.1
Public Types
-
using Loader = std::function<void(std::istream &istream, std::filesystem::path const &path)>¶
Loader functor is passed both the open stream and the actual path (for use in reporting problems)
-
using Loader = std::function<void(std::istream &istream, std::filesystem::path const &path)>¶