7#ifndef YARP_CONF_DIRS_H
8#define YARP_CONF_DIRS_H
18#ifndef DOXYGEN_SHOULD_SKIP_THIS
22static constexpr const char YARP_DATA_HOME[]{
"YARP_DATA_HOME"};
23static constexpr const char YARP_DATA_DIRS[]{
"YARP_DATA_DIRS"};
24static constexpr const char YARP_CONFIG_HOME[]{
"YARP_CONFIG_HOME"};
25static constexpr const char YARP_CONFIG_DIRS[]{
"YARP_CONFIG_DIRS"};
26static constexpr const char YARP_CACHE_HOME[]{
"YARP_CACHE_HOME"};
27static constexpr const char YARP_RUNTIME_DIR[]{
"YARP_RUNTIME_DIR"};
29static constexpr const char USER[]{
"USER"};
30static constexpr const char USERNAME[]{
"USERNAME"};
31static constexpr const char HOME[]{
"HOME"};
32static constexpr const char USERPROFILE[]{
"USERPROFILE"};
33static constexpr const char TMP[]{
"TMP"};
34static constexpr const char TEMP[]{
"TEMP"};
35static constexpr const char TMPDIR[]{
"TMPDIR"};
36static constexpr const char XDG_DATA_HOME[]{
"XDG_DATA_HOME"};
37static constexpr const char XDG_DATA_DIRS[]{
"XDG_DATA_DIRS"};
38static constexpr const char XDG_CONFIG_HOME[]{
"XDG_CONFIG_HOME"};
39static constexpr const char XDG_CONFIG_DIRS[]{
"XDG_CONFIG_DIRS"};
40static constexpr const char XDG_CACHE_HOME[]{
"XDG_CACHE_HOME"};
41static constexpr const char XDG_RUNTIME_DIR[]{
"XDG_RUNTIME_DIR"};
42static constexpr const char APPDATA[]{
"APPDATA"};
43static constexpr const char LOCALAPPDATA[]{
"LOCALAPPDATA"};
44static constexpr const char ALLUSERSPROFILE[]{
"ALLUSERSPROFILE"};
47static constexpr const char XDG_DATA_HOME_SUFFIX[]{
"/.local/share"};
48static constexpr const char XDG_CONFIG_HOME_SUFFIX[]{
"/.config"};
49static constexpr const char XDG_CACHE_HOME_SUFFIX[]{
"/.cache"};
50static constexpr const char XDG_DATA_DIRS_DEFAULT[]{
"/usr/local/share:/usr/share"};
51static constexpr const char XDG_CONFIG_DIRS_DEFAULT[]{
"/etc/xdg"};
53static constexpr const char UNIX_TMP_DIR_DEFAULT[]{
"/tmp"};
54static constexpr const char WIN_APPDATA_SUFFIX[]{
"\\AppData\\Roaming"};
55static constexpr const char WIN_LOCALAPPDATA_SUFFIX[]{
"\\AppData\\Local"};
56static constexpr const char WIN_APPDATA_LOCAL_TEMP_SUFFIX[]{
"\\AppData\\Local\\Temp"};
57static constexpr const char WIN_ALLUSERSPROFILE_DEFAULT[]{
"C:\\ProgramData"};
58static constexpr const char MACOS_DATAHOME_SUFFIX[]{
"/Library/Application Support"};
59static constexpr const char MACOS_CONFIGHOME_SUFFIX[]{
"/Library/Preferences"};
60static constexpr const char MACOS_DATA_DIRS_DEFAULT[]{
"/usr/local/share:/usr/share"};
61static constexpr const char MACOS_CONFIG_DIRS_DEFAULT[]{
"/etc:/Library/Preferences"};
62static constexpr const char MACOS_CACHEHOME_SUFFIX[]{
"/Library/Caches"};
66static 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' };
68static 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' };
129#elif defined(__APPLE__)
149#elif defined(__APPLE__)
170#elif defined(__APPLE__)
190#elif defined(__APPLE__)
211#elif defined(__APPLE__)
232#elif defined(__APPLE__)
258#elif defined(__APPLE__)
278#elif defined(__APPLE__)
299#elif defined(__APPLE__)
324#elif defined(__APPLE__)
345#elif defined(__APPLE__)
366#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::vector< std::string > yarpdatadirs()
Returns the directories where YARP data files should be searched.
std::string tempdir()
Returns the directory for temporary files.
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 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::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::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.
std::vector< std::string > configdirs()
Returns the directories where configuration files should be searched.
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::vector< std::string > get_path(const std::string &key, bool *found=nullptr)
Read a path from an environment variable.
std::string get_string(const std::string &key, bool *found=nullptr)
Read a string from an environment variable.
static constexpr value_type preferred_separator