MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / getUserDirectory

Function getUserDirectory

src/Platform/src/Platform.Posix.cpp:59–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 }
58
59 fs::path getUserDirectory()
60 {
61 auto path = fs::path(getEnvironmentVariable("XDG_CONFIG_HOME"));
62 if (path.empty())
63 {
64 path = getHomeDirectory();
65 if (path.empty())
66 {
67 path = "/";
68 }
69 else
70 {
71 path = path / fs::path(".config");
72 }
73 }
74 return path / fs::path("OpenLoco");
75 }
76#endif
77
78#if !(defined(__APPLE__) && defined(__MACH__))

Callers 4

getDumpDirectoryFunction · 0.70
resolveLocoInstallPathFunction · 0.50
getBasePathFunction · 0.50
getLogsFolderPathFunction · 0.50

Calls 3

getHomeDirectoryFunction · 0.85
getEnvironmentVariableFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected