diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2018-11-30 10:48:44 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2018-11-30 10:48:44 +0100 |
| commit | 5b2974cd16b5d2841b72c7d0cc4a34469a8ded5b (patch) | |
| tree | 27fe6f0b428a1e02f7fe7c677795bdd989e0498c /src/xdg.hpp | |
| parent | 543e91dc65d839864b42114b353d0c30db4dcdd1 (diff) | |
| download | wanda-5b2974cd16b5d2841b72c7d0cc4a34469a8ded5b.tar.xz wanda-5b2974cd16b5d2841b72c7d0cc4a34469a8ded5b.zip | |
core: implement basic XDG Base Specification support
Diffstat (limited to 'src/xdg.hpp')
| -rw-r--r-- | src/xdg.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/xdg.hpp b/src/xdg.hpp new file mode 100644 index 0000000..a5dace0 --- /dev/null +++ b/src/xdg.hpp @@ -0,0 +1,25 @@ +#ifndef WANDA_XDG_HPP +#define WANDA_XDG_HPP + +#include "environment.hpp" + +#include <cstddef> +#include <filesystem> +#include <type_traits> + +namespace wanda +{ +enum struct xdg_directory : std::underlying_type_t<std::byte> +{ + data_home, + config_home, + cache_home, + runtime_dir, +}; + +std::string xdg_variable(xdg_directory directory); + +std::filesystem::path xdg_path_for(xdg_directory directory, environment const &environment); +} // namespace wanda + +#endif
\ No newline at end of file |
