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

Method getUserDirectory

src/openms/source/SYSTEM/File.cpp:596–614  ·  view source on GitHub ↗

The current OpenMS user data path (for result files)

Source from the content-addressed store, hash-verified

594
595 /// The current OpenMS user data path (for result files)
596 String File::getUserDirectory()
597 {
598 Param p = getSystemParameters();
599 String dir;
600 if (getenv("OPENMS_HOME_PATH") != nullptr)
601 {
602 dir = getenv("OPENMS_HOME_PATH");
603 }
604 else if (p.exists("home_dir") && !String(p.getValue("home_dir").toString()).trim().empty())
605 {
606 dir = p.getValue("home_dir").toString();
607 }
608 else
609 {
610 dir = String(QDir::homePath());
611 }
612 dir.ensureLastChar('/');
613 return dir;
614 }
615
616 String File::findDatabase(const String& db_name)
617 {

Callers

nothing calls this directly

Calls 5

StringClass · 0.50
existsMethod · 0.45
emptyMethod · 0.45
toStringMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected