The current OpenMS user data path (for result files)
| 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 | { |