diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2026-01-02 22:42:31 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2026-01-02 22:42:31 +0100 |
| commit | 6ed8f5151719fbc14ec0ac6d28a346d1f74cf2ca (patch) | |
| tree | ebe7588e89e1aa2ae5376acf85f3a3a7b2ec7e10 /src/paths.hh | |
Diffstat (limited to 'src/paths.hh')
| -rw-r--r-- | src/paths.hh | 20 |
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 |
