fw4spl
Os.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2015.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWTOOLS_OS_HPP__
8 #define __FWTOOLS_OS_HPP__
9 
10 #include <string>
11 
12 #include "fwTools/config.hpp"
13 
14 
15 namespace fwTools
16 {
17 
23 namespace os
24 {
25 
26 
35 FWTOOLS_API std::string getEnv(const std::string &name, bool *ok = NULL);
36 
37 
44 FWTOOLS_API std::string getEnv(const std::string &name, const std::string &defaultValue);
45 
58 FWTOOLS_API std::string getUserDataDir(
59  std::string company = "",
60  std::string appName = "",
61  bool createDirectory = false
62  );
63 
64 
65 } // namespace os
66 
67 } // namespace fwTools
68 
69 #endif //__FWTOOLS_OS_HPP__
FWTOOLS_API std::string getUserDataDir(std::string company="", std::string appName="", bool createDirectory=false)
Return the users&#39;s application data directory.
Definition: Os.cpp:42
The namespace fwTools contains several tools like UUID, factory, dispatche, stringizer, macros, helper.
FWTOOLS_API std::string getEnv(const std::string &name, bool *ok=NULL)
Returns a environment variable value.
Definition: Os.cpp:20