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

Function GetDefaultDataDir

src/util/system.cpp:787–811  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

785
786#ifdef LIQUID
787fs::path GetDefaultDataDir()
788{
789 // Windows < Vista: C:\Documents and Settings\Username\Application Data\Liquid
790 // Windows >= Vista: C:\Users\Username\AppData\Roaming\Liquid
791 // Mac: ~/Library/Application Support/Liquid
792 // Unix: ~/.liquid
793#ifdef WIN32
794 // Windows
795 return GetSpecialFolderPath(CSIDL_APPDATA) / "Liquid";
796#else
797 fs::path pathRet;
798 char* pszHome = getenv("HOME");
799 if (pszHome == nullptr || strlen(pszHome) == 0)
800 pathRet = fs::path("/");
801 else
802 pathRet = fs::path(pszHome);
803#ifdef MAC_OSX
804 // Mac
805 return pathRet / "Library/Application Support/Liquid";
806#else
807 // Unix
808 return pathRet / ".liquid";
809#endif
810#endif
811}
812#else
813fs::path GetDefaultDataDir()
814{

Callers 3

StartLoggingFunction · 0.85
getDefaultDataDirectoryFunction · 0.85
system.cppFile · 0.85

Calls 2

GetSpecialFolderPathFunction · 0.85
pathClass · 0.85

Tested by

no test coverage detected