diff options
author | HampusM <hampus@hampusmat.com> | 2022-06-12 13:44:58 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:57:01 +0200 |
commit | 927e065f9829045247be7c0b3296408b6f577c1f (patch) | |
tree | 7da3d9cd5aa4070414a8708a582f6c3ab3e1e708 /src/util/fs.hpp | |
parent | eb66598c326862fd9dfc1899be4eac93f81a8023 (diff) |
feat: add reading RLE files
Diffstat (limited to 'src/util/fs.hpp')
-rw-r--r-- | src/util/fs.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/util/fs.hpp b/src/util/fs.hpp new file mode 100644 index 0000000..860c055 --- /dev/null +++ b/src/util/fs.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include <filesystem> +#include <string_view> +#include <unordered_map> + +const std::unordered_map<std::filesystem::file_type, std::string_view> file_type_names = { + {std::filesystem::file_type::none, "none"}, + {std::filesystem::file_type::not_found, "not_found"}, + {std::filesystem::file_type::regular, "regular"}, + {std::filesystem::file_type::directory, "directory"}, + {std::filesystem::file_type::symlink, "symlink"}, + {std::filesystem::file_type::block, "block"}, + {std::filesystem::file_type::character, "character"}, + {std::filesystem::file_type::fifo, "fifo"}, + {std::filesystem::file_type::socket, "socket"}, + {std::filesystem::file_type::unknown, "unknown"}}; + +auto get_current_user_home_path() noexcept -> std::filesystem::path; + +auto expand_path_home(const std::filesystem::path &path) noexcept + -> std::filesystem::path; |