Rose
|
A class to determine and provide searching of XDG standard files paths. More...
#include <XDGFilePaths.h>
Classes | |
struct | XDG_Env_Spec |
Public Types | |
enum | XDG_Name : std::size_t { XDG_DATA_HOME, XDG_CONFIG_HOME, XDG_DATA_DIRS, XDG_CONFIG_DIRS, XDG_CACHE_HOME, XDG_RUNTIME_DIR } |
using | XDG_Env_Var_List = std::array< XDG_Env_Spec, 6 > |
using | XDG_Path_Set = std::vector< std::filesystem::path > |
using | XDG_Paths = std::map< XDG_Name, XDG_Path_Set > |
Public Member Functions | |
template<typename S > | |
std::tuple< bool, std::filesystem::path > | findFilePath (XDG_Name name, const S &relativePath) |
Search for a relative path on one of the XDG standard locations. More... | |
Protected Attributes | |
XDG_Paths | mPaths {} |
All the XDG specified paths. | |
std::string | mHome |
User's home directory. | |
Static Protected Attributes | |
static constexpr XDG_Env_Var_List | mEnvVars |
A class to determine and provide searching of XDG standard files paths.
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
inline |
Search for a relative path on one of the XDG standard locations.
If the relative path is found below one of the specified paths in the named location, the return value is true with the full absolute path to the location. If not found the return value is false with the full absolute path to the relative location in the preferred directory.
S | The type of the relative path, implicitly convertible to a std::string. |
name | The XDG name |
relativePath | A path releative to an XDG location to search for. |
|
staticprotected |