7 #ifndef YARP_CONF_DIRS_H
8 #define YARP_CONF_DIRS_H
20 #ifndef DOXYGEN_SHOULD_SKIP_THIS
24 static constexpr
const char YARP_DATA_HOME[]{
"YARP_DATA_HOME"};
25 static constexpr
const char YARP_DATA_DIRS[]{
"YARP_DATA_DIRS"};
26 static constexpr
const char YARP_CONFIG_HOME[]{
"YARP_CONFIG_HOME"};
27 static constexpr
const char YARP_CONFIG_DIRS[]{
"YARP_CONFIG_DIRS"};
28 static constexpr
const char YARP_CACHE_HOME[]{
"YARP_CACHE_HOME"};
29 static constexpr
const char YARP_RUNTIME_DIR[]{
"YARP_RUNTIME_DIR"};
31 static constexpr
const char USER[]{
"USER"};
32 static constexpr
const char USERNAME[]{
"USERNAME"};
33 static constexpr
const char HOME[]{
"HOME"};
34 static constexpr
const char USERPROFILE[]{
"USERPROFILE"};
35 static constexpr
const char TMP[]{
"TMP"};
36 static constexpr
const char TEMP[]{
"TEMP"};
37 static constexpr
const char TMPDIR[]{
"TMPDIR"};
38 static constexpr
const char XDG_DATA_HOME[]{
"XDG_DATA_HOME"};
39 static constexpr
const char XDG_DATA_DIRS[]{
"XDG_DATA_DIRS"};
40 static constexpr
const char XDG_CONFIG_HOME[]{
"XDG_CONFIG_HOME"};
41 static constexpr
const char XDG_CONFIG_DIRS[]{
"XDG_CONFIG_DIRS"};
42 static constexpr
const char XDG_CACHE_HOME[]{
"XDG_CACHE_HOME"};
43 static constexpr
const char XDG_RUNTIME_DIR[]{
"XDG_RUNTIME_DIR"};
44 static constexpr
const char APPDATA[]{
"APPDATA"};
45 static constexpr
const char LOCALAPPDATA[]{
"LOCALAPPDATA"};
46 static constexpr
const char ALLUSERSPROFILE[]{
"ALLUSERSPROFILE"};
49 static constexpr
const char XDG_DATA_HOME_SUFFIX[]{
"/.local/share"};
50 static constexpr
const char XDG_CONFIG_HOME_SUFFIX[]{
"/.config"};
51 static constexpr
const char XDG_CACHE_HOME_SUFFIX[]{
"/.cache"};
52 static constexpr
const char XDG_DATA_DIRS_DEFAULT[]{
"/usr/local/share:/usr/share"};
53 static constexpr
const char XDG_CONFIG_DIRS_DEFAULT[]{
"/etc/xdg"};
55 static constexpr
const char UNIX_TMP_DIR_DEFAULT[]{
"/tmp"};
56 static constexpr
const char WIN_APPDATA_SUFFIX[]{
"\\AppData\\Roaming"};
57 static constexpr
const char WIN_LOCALAPPDATA_SUFFIX[]{
"\\AppData\\Local"};
58 static constexpr
const char WIN_APPDATA_LOCAL_TEMP_SUFFIX[]{
"\\AppData\\Local\\Temp"};
59 static constexpr
const char WIN_ALLUSERSPROFILE_DEFAULT[]{
"C:\\ProgramData"};
60 static constexpr
const char MACOS_DATAHOME_SUFFIX[]{
"/Library/Application Support"};
61 static constexpr
const char MACOS_CONFIGHOME_SUFFIX[]{
"/Library/Preferences"};
62 static constexpr
const char MACOS_DATA_DIRS_DEFAULT[]{
"/usr/local/share:/usr/share"};
63 static constexpr
const char MACOS_CONFIG_DIRS_DEFAULT[]{
"/etc:/Library/Preferences"};
64 static constexpr
const char MACOS_CACHEHOME_SUFFIX[]{
"/Library/Caches"};
68 static constexpr
const char YARP_CONFIG_SUFFIX[]{
yarp::conf::filesystem::preferred_separator,
'y',
'a',
'r',
'p',
yarp::conf::filesystem::preferred_separator,
'c',
'o',
'n',
'f',
'i',
'g',
'\0' };
70 static constexpr
const char RUNTIME_YARP_SUFFIX[]{
yarp::conf::filesystem::preferred_separator,
'r',
'u',
'n',
't',
'i',
'm',
'e',
yarp::conf::filesystem::preferred_separator,
'y',
'a',
'r',
'p',
'\0' };
131 #elif defined(__APPLE__)
151 #elif defined(__APPLE__)
172 #elif defined(__APPLE__)
192 #elif defined(__APPLE__)
213 #elif defined(__APPLE__)
234 #elif defined(__APPLE__)
260 #elif defined(__APPLE__)
280 #elif defined(__APPLE__)
301 #elif defined(__APPLE__)
326 #elif defined(__APPLE__)
347 #elif defined(__APPLE__)
368 #elif defined(__APPLE__)
std::string yarpdatahome()
Returns the directory where user-specific YARP data files should be written.
std::string yarpruntimedir()
Returns the directory where user-specific runtime YARP files and other YARP file objects should be pl...
std::string tempdir()
Returns the directory for temporary files.
std::string confighome()
Returns the directory where user-specific configuration files should be written.
std::string cachehome()
Returns the directory where user-specific non-essential (cached) data should be written.
std::vector< std::string > datadirs()
Returns the directories where data files should be searched.
std::vector< std::string > yarpconfigdirs()
Returns the directories where YARP configuration files should be searched.
std::string yarpconfighome()
Returns the directory where user-specific YARP configuration files should be written.
std::string home()
Returns the home directory for current user.
std::string datahome()
Returns the directory where user-specific data files should be written.
std::vector< std::string > yarpdatadirs()
Returns the directories where YARP data files should be searched.
std::vector< std::string > configdirs()
Returns the directories where configuration files should be searched.
std::string yarpcachehome()
Returns the directory where user-specific non-essential (cached) YARP data should be written.
std::string runtimedir()
Returns the directory where user-specific runtime files and other file objects should be placed.
ContainerT split_path(const typename ContainerT::value_type &s)
Utility to split a string containing a path separated by the path_separator, which depends on the sys...
std::string get_string(const std::string &key, bool *found=nullptr)
Read a string from an environment variable.
std::vector< std::string > get_path(const std::string &key, bool *found=nullptr)
Read a path from an environment variable.
static constexpr value_type preferred_separator
The main, catch-all namespace for YARP.