diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2026-06-04 19:58:56 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2026-06-04 19:58:56 +0200 |
| commit | 7832816c0d239c1cd7a91daef3f15c8f94197e28 (patch) | |
| tree | d1de8dec25496a3a98234644a60d5c6f98140f06 /cabinet/magic.hpp | |
| parent | 11df846b1ec951dd35feb9b0bad42486c7b94dca (diff) | |
| download | cabinet-7832816c0d239c1cd7a91daef3f15c8f94197e28.tar.xz cabinet-7832816c0d239c1cd7a91daef3f15c8f94197e28.zip | |
magic: implement file processing
Diffstat (limited to 'cabinet/magic.hpp')
| -rw-r--r-- | cabinet/magic.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cabinet/magic.hpp b/cabinet/magic.hpp index 25cf60b..222d488 100644 --- a/cabinet/magic.hpp +++ b/cabinet/magic.hpp @@ -4,6 +4,8 @@ #include <magic.h> #include <expected> +#include <filesystem> +#include <string> #include <string_view> #include <system_error> #include <utility> @@ -52,6 +54,8 @@ namespace cab auto operator=(magic const &) -> magic & = delete; auto operator=(magic && other) noexcept -> magic &; + auto process(std::filesystem::path path) -> std::expected<std::string, std::string>; + private: explicit magic(::magic_t cookie) noexcept; |
