![]() |
OpenMS
|
Per-user OpenMS configuration: the OpenMS.ini system parameters and the home, temporary and database directories derived from them. More...
#include <OpenMS/SYSTEM/SystemSettings.h>
Static Public Member Functions | |
| static std::string | getOpenMSHomePath () |
| Returns the OpenMS home path (environment variable overwrites the default home path) | |
| static std::string | getOpenMSConfigDir () |
| Returns the per-user OpenMS configuration directory (the directory that holds OpenMS.ini) | |
| static std::string | getTempDirectory () |
| static std::string | getUserDirectory () |
| static Param | getSystemParameters () |
| static std::string | findDatabase (const std::string &db_name) |
Static Private Member Functions | |
| static Param | getSystemParameterDefaults_ () |
| get defaults for the system's Temp-path, user home directory etc. | |
Per-user OpenMS configuration: the OpenMS.ini system parameters and the home, temporary and database directories derived from them.
Every lookup honours the environment overrides (OPENMS_HOME_PATH, OPENMS_TMPDIR, XDG_CONFIG_HOME) before consulting OpenMS.ini and the platform defaults.
This class depends on File and Param; File does not depend on it. These lookups used to be static members of File.
|
static |
uses File::find() to search for a file names db_name in the 'id_db_dir' param of the OpenMS system parameters
| FileNotFound | is thrown, if the file is not found |
|
static |
Returns the per-user OpenMS configuration directory (the directory that holds OpenMS.ini)
Follows the XDG base directory specification on unix-like systems (<XDG_CONFIG_HOME>/OpenMS or <home>/.config/OpenMS) and uses <home>/.OpenMS otherwise. The returned path has no trailing separator and the directory is not guaranteed to exist.
|
static |
Returns the OpenMS home path (environment variable overwrites the default home path)
|
staticprivate |
get defaults for the system's Temp-path, user home directory etc.
|
static |
Returns the OpenMS.ini system parameters, read from getOpenMSConfigDir() + "/OpenMS.ini". The file is optional and never written by OpenMS. Entries it does not set (all of them, if the file does not exist) are taken from the built-in defaults, as are entries of the wrong type (with a warning). 'version' always holds the running OpenMS version.
|
static |
The current OpenMS temporary data path (for temporary files). Looks up the following locations, taking the first one which is set:
Referenced by TOPPViewBase::finishTOPPToolExecution(), TOPPViewBase::showTOPPDialog_(), TOPPASBase::TOPPASBase(), and TOPPASBase::~TOPPASBase().
|
static |
The current OpenMS user data path (for result files), with a trailing '/'. Resolved in the following order, taking the first one which is set: