$darkmode
#include <filesystem>#include <functional>#include <string>#include <vector>Go to the source code of this file.
Enumerations | |
| enum class | cloe::utility::XdgError { RELATIVE_XDG_PATH , HOME_UNSET , EMPTY_DEFAULT } |
Functions | |
| std::filesystem::path | cloe::utility::xdg_getenv_path (const std::string &env) |
| std::filesystem::path | cloe::utility::xdg_path (const std::string &env, const std::filesystem::path &default_path) |
| std::vector< std::filesystem::path > | cloe::utility::xdg_paths (const std::string &env, const std::string &default_paths) |
| std::filesystem::path | cloe::utility::xdg_find (const std::filesystem::path &file, const std::vector< std::filesystem::path > &dirs) |
| std::vector< std::filesystem::path > | cloe::utility::xdg_findall (const std::filesystem::path &file, const std::vector< std::filesystem::path > &dirs) |
| void | cloe::utility::xdg_merge (const std::filesystem::path &file, const std::vector< std::filesystem::path > &dirs, bool reverse, const std::function< bool(const std::filesystem::path &)> &mergefn) |
| std::filesystem::path | cloe::utility::config_home () |
User configuration base directory, e.g., ~./config. | |
| std::filesystem::path | cloe::utility::data_home () |
User data files base directory, e.g., ~/.local/share. | |
| std::filesystem::path | cloe::utility::cache_home () |
User cache files base directory, e.g., ~/.cache. | |
| std::filesystem::path | cloe::utility::runtime_dir () |
User runtime files base directory, e.g., /run/user/1000 | |
| std::vector< std::filesystem::path > | cloe::utility::config_dirs () |
Global configuration directories, e.g., /etc/xdg. | |
| std::vector< std::filesystem::path > | cloe::utility::data_dirs () |
Global data files directories, e.g., /usr/local/share. | |
| std::vector< std::filesystem::path > | cloe::utility::all_config_dirs () |
| User and global configuration directories. | |
| std::vector< std::filesystem::path > | cloe::utility::all_data_dirs () |
| User and global data directories. | |
| std::filesystem::path | cloe::utility::user_config (const std::filesystem::path &file) |
| std::filesystem::path | cloe::utility::user_data (const std::filesystem::path &file) |
| std::filesystem::path | cloe::utility::user_cache (const std::filesystem::path &file) |
| std::filesystem::path | cloe::utility::user_runtime (const std::filesystem::path &file) |
| std::filesystem::path | cloe::utility::find_config (const std::filesystem::path &file) |
| std::filesystem::path | cloe::utility::find_data (const std::filesystem::path &file) |
| std::filesystem::path | cloe::utility::find_cache (const std::filesystem::path &file) |
| std::filesystem::path | cloe::utility::find_runtime (const std::filesystem::path &file) |
| std::vector< std::filesystem::path > | cloe::utility::find_all_config (const std::filesystem::path &file) |
| std::vector< std::filesystem::path > | cloe::utility::find_all_data (const std::filesystem::path &file) |
| void | cloe::utility::merge_config (const std::filesystem::path &file, const std::function< bool(const std::filesystem::path &)> &mergefn, bool reverse=false) |
| void | cloe::utility::merge_data (const std::filesystem::path &file, const std::function< bool(const std::filesystem::path &)> &mergefn, bool reverse=false) |
This file implements the basic XDG specification, as specified here.
Inspiration for the API of this library taken from https://github.com/goulash/xdg.
|
strong |
This enum class contains all the exceptions that can be thrown.