| 574 | } |
| 575 | |
| 576 | String File::getTempDirectory() |
| 577 | { |
| 578 | Param p = getSystemParameters(); |
| 579 | String dir; |
| 580 | if (getenv("OPENMS_TMPDIR") != nullptr) |
| 581 | { |
| 582 | dir = getenv("OPENMS_TMPDIR"); |
| 583 | } |
| 584 | else if (p.exists("temp_dir") && !String(p.getValue("temp_dir").toString()).trim().empty()) |
| 585 | { |
| 586 | dir = p.getValue("temp_dir").toString(); |
| 587 | } |
| 588 | else |
| 589 | { |
| 590 | dir = String(QDir::tempPath()); |
| 591 | } |
| 592 | return dir; |
| 593 | } |
| 594 | |
| 595 | /// The current OpenMS user data path (for result files) |
| 596 | String File::getUserDirectory() |