Rose
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
rose::Environment Class Reference
Collaboration diagram for rose::Environment:
Collaboration graph
[legend]

Public Member Functions

 Environment (const Environment &)=delete
 
 Environment (Environment &&)=delete
 
Environmentoperator= (const Environment &)=delete
 
Environmentoperator= (Environment &&)=delete
 
const std::string & appName () const
 
const std::filesystem::path & configHome () const
 
const std::filesystem::path & cacheHome () const
 
const std::filesystem::path & dataHome () const
 
const std::filesystem::path & appResources () const
 
template<typename Source >
std::filesystem::path appResourcesAppend (Source source)
 
std::filesystem::path getenv_path (XDGFilePaths::XDG_Name name, const std::string &appName, bool create)
 Find the XDG directory for a specified application name. More...
 

Static Public Member Functions

static EnvironmentgetEnvironment ()
 

Protected Attributes

std::filesystem::path mHomeDirectory
 The user's home directory path.
 
std::filesystem::path mDataHome
 The user's XDG Data Home path.
 
std::filesystem::path mConfigHome
 The user's XDG Config Home path.
 
std::filesystem::path mCacheHome
 The user's XDG Cache Home path.
 
std::filesystem::path mAppResources
 Resources installed with the application.
 
std::filesystem::path mLibResources
 Resources shared by applications using the library. More...
 
XDGFilePaths mFilePaths {}
 XDG Spec file paths.
 
std::string mAppName
 Application name as provided by the system.
 

Member Function Documentation

◆ getenv_path()

std::filesystem::path rose::Environment::getenv_path ( XDGFilePaths::XDG_Name  name,
const std::string &  appName,
bool  create 
)

Find the XDG directory for a specified application name.

If the path location does not exist, and create is set to true, it is created along with all parent directories with permissions set to std::filesystem::perms::all modified by umask(2).

Parameters
nameThe XDG Name.
appNameThe application name.
createSet to true if non-existent directories should be created.
Returns

Member Data Documentation

◆ mLibResources

std::filesystem::path rose::Environment::mLibResources
protected

Resources shared by applications using the library.

The content of this directory is maintained by the library developer. Any user data placed or installed in this directory may be over written by updates.


The documentation for this class was generated from the following files: