summaryrefslogtreecommitdiff
path: root/src/paths.hh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2025-10-07 19:58:28 +0200
committerJoel Klinghed <the_jk@spawned.biz>2025-10-19 00:13:47 +0200
commit4f6e76493fb74f5385d5a14dce3a01c9901802ed (patch)
treea38722ec832fd44ad34257730e075e8b07825bd0 /src/paths.hh
parentc87f9627efc8b612eb9b000acfcc6731cad15765 (diff)
paths: New module
Path utilities (doh)
Diffstat (limited to 'src/paths.hh')
-rw-r--r--src/paths.hh20
1 files changed, 20 insertions, 0 deletions
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 <filesystem> // IWYU pragma: export
+#include <vector>
+
+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<std::filesystem::path> config_dirs();
+
+// Return data directories for reading, in order of priority.
+std::vector<std::filesystem::path> data_dirs();
+
+} // namespace paths
+
+#endif // PATHS_HH