13 char const *hdrive = getenv(
"HOMEDRIVE");
14 char const *hpath = getenv(
"HOMEPATH");
15 if (hdrive !=
nullptr && hpath !=
nullptr) {
20 const char *home = std::getenv(
"HOME");
21 if (home !=
nullptr) {
32 char const *pairinteraction_cache_dir = getenv(
"PAIRINTERACTION_CACHE_DIR");
33 if (pairinteraction_cache_dir !=
nullptr) {
34 path = pairinteraction_cache_dir;
39 char const *localappdata = std::getenv(
"LOCALAPPDATA");
40 if (localappdata !=
nullptr) {
45 path /=
"pairinteraction";
49 char const *xdg_cache_home = std::getenv(
"XDG_CACHE_HOME");
50 if (xdg_cache_home !=
nullptr) {
51 path = xdg_cache_home;
55 path /=
"pairinteraction";
64 char const *pairinteraction_config_dir = getenv(
"PAIRINTERACTION_CONFIG_DIR");
65 if (pairinteraction_config_dir !=
nullptr) {
66 path = pairinteraction_config_dir;
71 char const *appdata = std::getenv(
"APPDATA");
72 if (appdata !=
nullptr) {
77 path /=
"pairinteraction";
81 char const *xdg_config_home = std::getenv(
"XDG_CONFIG_HOME");
82 if (xdg_config_home !=
nullptr) {
83 path = xdg_config_home;
87 path /=
"pairinteraction";
std::filesystem::path get_home_directory()
std::filesystem::path get_config_directory()
std::filesystem::path get_cache_directory()