fw4spl
|
Namespace fwTools::os contains tools methods which depend on os like get user application data directory. More...
Functions | |
FWTOOLS_API std::string | getEnv (const std::string &name, bool *ok=NULL) |
Returns a environment variable value. More... | |
FWTOOLS_API std::string | getEnv (const std::string &name, const std::string &defaultValue) |
Returns a environment variable value. More... | |
FWTOOLS_API std::string | getUserDataDir (std::string company="", std::string appName="", bool createDirectory=false) |
Return the users's application data directory. More... | |
Namespace fwTools::os contains tools methods which depend on os like get user application data directory.
std::string fwTools::os::getEnv | ( | const std::string & | name, |
bool * | ok = NULL |
||
) |
Returns a environment variable value.
name | environment variable 'name' | |
[out] | ok | boolean set to true if variable exists |
Definition at line 20 of file Os.cpp.
Referenced by getEnv(), ioVTK::SImageSeriesReader::info(), and uiMedDataQt::action::SExportSeries::updating().
std::string fwTools::os::getEnv | ( | const std::string & | name, |
const std::string & | defaultValue | ||
) |
std::string fwTools::os::getUserDataDir | ( | std::string | company = "" , |
std::string | appName = "" , |
||
bool | createDirectory = false |
||
) |
Return the users's application data directory.
company | The company name |
appName | The application name |
createDirectory | if true, create the returned directory if it don't exist |
Return the application data directory. If company or appName is not empty, append them to the path. Under unix, XDG conventions are repected. For example, the UserDataDir under linux will be "~/.config/company/appName"
Definition at line 42 of file Os.cpp.
References OSLM_ERROR, and OSLM_INFO.