MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetSpecialFolderPath

Function GetSpecialFolderPath

src/util/system.cpp:1279–1290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1277
1278#ifdef WIN32
1279fs::path GetSpecialFolderPath(int nFolder, bool fCreate)
1280{
1281 WCHAR pszPath[MAX_PATH] = L"";
1282
1283 if(SHGetSpecialFolderPathW(nullptr, pszPath, nFolder, fCreate))
1284 {
1285 return fs::path(pszPath);
1286 }
1287
1288 LogPrintf("SHGetSpecialFolderPathW() failed, could not obtain requested path.\n");
1289 return fs::path("");
1290}
1291#endif
1292
1293#ifndef WIN32

Callers 3

StartupShortcutPathFunction · 0.85
GetDefaultDataDirFunction · 0.85

Calls 1

pathClass · 0.85

Tested by

no test coverage detected