From 4f6e76493fb74f5385d5a14dce3a01c9901802ed Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Tue, 7 Oct 2025 19:58:28 +0200 Subject: paths: New module Path utilities (doh) --- src/paths.hh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/paths.hh (limited to 'src/paths.hh') diff --git a/src/paths.hh b/src/paths.hh new file mode 100644 index 0000000..8bd4c75 --- /dev/null +++ b/src/paths.hh @@ -0,0 +1,20 @@ +#ifndef PATHS_HH +#define PATHS_HH + +#include // IWYU pragma: export +#include + +namespace paths { + +// Return home directory, goes HOME, /etc/passwd entry, / in that order. +std::filesystem::path home(); + +// Return config directories for reading, in order of priority. +std::vector config_dirs(); + +// Return data directories for reading, in order of priority. +std::vector data_dirs(); + +} // namespace paths + +#endif // PATHS_HH -- cgit v1.2.3-70-g09d2