From 5b2974cd16b5d2841b72c7d0cc4a34469a8ded5b Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 30 Nov 2018 10:48:44 +0100 Subject: core: implement basic XDG Base Specification support --- src/xdg.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/xdg.hpp (limited to 'src/xdg.hpp') 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 +#include +#include + +namespace wanda +{ +enum struct xdg_directory : std::underlying_type_t +{ + 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 -- cgit v1.2.3