summaryrefslogtreecommitdiff
path: root/cabinet/magic.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'cabinet/magic.hpp')
-rw-r--r--cabinet/magic.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/cabinet/magic.hpp b/cabinet/magic.hpp
index 9e078de..68177f9 100644
--- a/cabinet/magic.hpp
+++ b/cabinet/magic.hpp
@@ -3,8 +3,10 @@
#include <magic.h>
+#include <cstddef>
#include <expected>
#include <filesystem>
+#include <span>
#include <string>
#include <string_view>
#include <system_error>
@@ -56,6 +58,7 @@ namespace cab
auto process(std::filesystem::path path) -> std::expected<std::string, std::error_code>;
auto process(int file_descriptor) -> std::expected<std::string, std::error_code>;
+ auto process(std::span<std::byte> data) -> std::expected<std::string, std::error_code>;
private:
auto handle_result(char const * result) -> std::expected<std::string, std::error_code>;