MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / GetFolderPath

Function GetFolderPath

src/openrct2/platform/Platform.Linux.cpp:84–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 }
83
84 std::string GetFolderPath(SpecialFolder folder)
85 {
86 switch (folder)
87 {
88 case SpecialFolder::userCache:
89 case SpecialFolder::userConfig:
90 case SpecialFolder::userData:
91 {
92 auto path = GetEnvironmentPath("XDG_CONFIG_HOME");
93 if (path.empty())
94 {
95 auto home = GetFolderPath(SpecialFolder::userHome);
96 path = Path::Combine(home, u8".config");
97 }
98 return path;
99 }
100 case SpecialFolder::userHome:
101 return GetHomePath();
102 default:
103 return std::string();
104 }
105 }
106
107 std::string GetDocsPath()
108 {

Callers 5

GetSearchablePathsRCT1Function · 0.70
GetSearchablePathsRCT2Function · 0.70
FindRCT2PathFunction · 0.50
SelectGogInstallerFunction · 0.50

Calls 4

GetEnvironmentPathFunction · 0.85
GetHomePathFunction · 0.85
CombineFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected