YARP
Yet Another Robot Platform
yarp::conf::dirs Namespace Reference

Functions

std::string home ()
 Returns the home directory for current user. More...
 
std::string tempdir ()
 Returns the directory for temporary files. More...
 
std::string datahome ()
 Returns the directory where user-specific data files should be written. More...
 
std::vector< std::string > datadirs ()
 Returns the directories where data files should be searched. More...
 
std::string confighome ()
 Returns the directory where user-specific configuration files should be written. More...
 
std::vector< std::string > configdirs ()
 Returns the directories where configuration files should be searched. More...
 
std::string cachehome ()
 Returns the directory where user-specific non-essential (cached) data should be written. More...
 
std::string runtimedir ()
 Returns the directory where user-specific runtime files and other file objects should be placed. More...
 
std::string yarpdatahome ()
 Returns the directory where user-specific YARP data files should be written. More...
 
std::vector< std::string > yarpdatadirs ()
 Returns the directories where YARP data files should be searched. More...
 
std::string yarpconfighome ()
 Returns the directory where user-specific YARP configuration files should be written. More...
 
std::vector< std::string > yarpconfigdirs ()
 Returns the directories where YARP configuration files should be searched. More...
 
std::string yarpcachehome ()
 Returns the directory where user-specific non-essential (cached) YARP data should be written. More...
 
std::string yarpruntimedir ()
 Returns the directory where user-specific runtime YARP files and other YARP file objects should be placed. More...
 

Function Documentation

◆ cachehome()

std::string yarp::conf::dirs::cachehome ( )
inline

Returns the directory where user-specific non-essential (cached) data should be written.

  • Windows: LOCALAPPDATA environment variable (default: [HOME]\AppData\Local)
  • macOS: [HOME]/Library/Caches
  • Others: XDG_CACHE_HOME environment variable (default: [HOME]/.cache)
Since
YARP 3.5

Definition at line 207 of file dirs.h.

◆ configdirs()

std::vector< std::string > yarp::conf::dirs::configdirs ( )
inline

Returns the directories where configuration files should be searched.

  • Windows: ALLUSERSPROFILE environment variable (default: C:\\ProgramData)
  • macOS: /etc:/Library/Preferences
  • Others: XDG_CONFIG_DIRS environment variable (default: /etc/xdg)
Since
YARP 3.5

Definition at line 186 of file dirs.h.

◆ confighome()

std::string yarp::conf::dirs::confighome ( )
inline

Returns the directory where user-specific configuration files should be written.

  • Windows: APPDATA environment variable (default: [HOME]\AppData\Roaming)
  • macOS: [HOME]/Library/Preferences
  • Others: XDG_CONFIG_HOME environment variable (default: [HOME]/.config)
Since
YARP 3.5

Definition at line 166 of file dirs.h.

◆ datadirs()

std::vector< std::string > yarp::conf::dirs::datadirs ( )
inline

Returns the directories where data files should be searched.

  • Windows: ALLUSERSPROFILE environment variable (default: C:\\ProgramData)
  • macOS: /usr/local/share:/usr/share
  • Others: XDG_DATA_DIRS environment variable (default: /usr/local/share:/usr/share)
Since
YARP 3.5

Definition at line 145 of file dirs.h.

◆ datahome()

std::string yarp::conf::dirs::datahome ( )
inline

Returns the directory where user-specific data files should be written.

  • Windows: APPDATA environment variable (default: [HOME]\AppData\Roaming)
  • macOS: [HOME]/Library/Application Support
  • Others: XDG_DATA_HOME environment variable (default: [HOME]/.local/share)
Since
YARP 3.5

Definition at line 125 of file dirs.h.

◆ home()

std::string yarp::conf::dirs::home ( )
inline

Returns the home directory for current user.

  • Windows: USERPROFILE environment variable
  • Others: HOME environment variable
Since
YARP 3.5

Definition at line 84 of file dirs.h.

◆ runtimedir()

std::string yarp::conf::dirs::runtimedir ( )
inline

Returns the directory where user-specific runtime files and other file objects should be placed.

  • Windows: [TEMP]\runtime
  • macOS: [TEMP]/runtime-[USER]
  • Others: XDG_RUNTIME_DIR environment variable (default: [TEMP]/runtime-[USER])
Since
YARP 3.5

Definition at line 228 of file dirs.h.

◆ tempdir()

std::string yarp::conf::dirs::tempdir ( )
inline

Returns the directory for temporary files.

  • Windows: TEMP or TMP environment variables (default: [HOME]\AppData\Local\Temp)
  • Others: TMPDIR environment variables (default: /tmp)
Since
YARP 3.5

Definition at line 101 of file dirs.h.

◆ yarpcachehome()

std::string yarp::conf::dirs::yarpcachehome ( )
inline

Returns the directory where user-specific non-essential (cached) YARP data should be written.

Uses YARP_CACHE_HOME environment variable, if defined. Otherwise uses the yarp folder inside the folder returned by yarp::conf::dirs::cachehome()

Since
YARP 3.5

Definition at line 341 of file dirs.h.

◆ yarpconfigdirs()

std::vector< std::string > yarp::conf::dirs::yarpconfigdirs ( )
inline

Returns the directories where YARP configuration files should be searched.

Uses YARP_CONFIG_DIRS environment variable, if defined. Otherwise uses the yarp folder (yarp\config on Windows) inside each folder returned by yarp::conf::dirs::configdirs()

Warning
On linux, if XDG_CONFIG_DIRS is not defined, the folder /etc/yarp is used instead of /etc/xdg/yarp. This might change in the future.
Since
YARP 3.5

Definition at line 320 of file dirs.h.

◆ yarpconfighome()

std::string yarp::conf::dirs::yarpconfighome ( )
inline

Returns the directory where user-specific YARP configuration files should be written.

Uses YARP_CONFIG_HOME environment variable, if defined. Otherwise uses the yarp folder (yarp\config on Windows) inside the folder returned by yarp::conf::dirs::confighome()

Since
YARP 3.5

Definition at line 295 of file dirs.h.

◆ yarpdatadirs()

std::vector< std::string > yarp::conf::dirs::yarpdatadirs ( )
inline

Returns the directories where YARP data files should be searched.

Uses YARP_DATA_DIRS environment variable, if defined. Otherwise uses the "yarp" folder inside each folder returned by yarp::conf::dirs::datadirs()

Since
YARP 3.5

Definition at line 274 of file dirs.h.

◆ yarpdatahome()

std::string yarp::conf::dirs::yarpdatahome ( )
inline

Returns the directory where user-specific YARP data files should be written.

Uses YARP_DATA_HOME environment variable, if defined. Otherwise uses the "yarp" folder inside the folder returned by yarp::conf::dirs::datahome()

Since
YARP 3.5

Definition at line 254 of file dirs.h.

◆ yarpruntimedir()

std::string yarp::conf::dirs::yarpruntimedir ( )
inline

Returns the directory where user-specific runtime YARP files and other YARP file objects should be placed.

Uses YARP_RUNTIME_DIR environment variable, if defined. Otherwise uses the yarp folder inside the folder returned by yarp::conf::dirs::runtimedir()

Since
YARP 3.5

Definition at line 362 of file dirs.h.