[#common-InitConfig] = xref:common.adoc[common]::InitConfig :relfileprefix: ../ :mrdocs: Read config files, and create datadir and settings.json if they don't exist. == Synopsis Declared in `<common/init.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::optional<ConfigError> InitConfig( xref:ArgsManager.adoc[ArgsManager]& args, xref:common/SettingsAbortFn.adoc[SettingsAbortFn] settings_abort_fn = nullptr); ---- == Return Value A ConfigError if initialization failed, or std::nullopt on success. == Parameters [cols="1,4"] |=== | Name| Description | *args* | The argument manager holding parsed command‐line and config values. | *settings_abort_fn* | Callback invoked to decide whether to abort when settings.json cannot be parsed. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#