Skip to content

Engine → Platform

user_directories.h

Per-user folders of the operating system. The editor keeps its per-user preferences there: the active theme, the user themes and the recent projects.

Functions

Public

user_config_directory

[[nodiscard]] CONJURE_API core::result<std::filesystem::path> user_config_directory();

The folder for Conjure's per-user configuration: %APPDATA%/Conjure on Windows (USERPROFILE/AppData/Roaming when APPDATA is unset), $XDG_CONFIG_HOME/conjure on Linux (~/.config/conjure when the variable is unset, empty or relative, as the XDG Base Directory specification asks) and ~/Library/Application Support/Conjure on macOS, where the home folder is $HOME or, when that is unset or relative, the user database's entry. The path is absolute and lexically normal; the folder is not created and may not exist yet. NOT_FOUND when no absolute home or application-data folder can be found. Main thread only: it reads the process environment, which another thread could be changing.