From 3d7740818ec5fe3b078ab2b6b3a41044ae903bc9 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Tue, 11 May 2021 18:28:31 +0200 Subject: Added PathFromHandle helper function Primarily to be used to add context to error messages in places where we only have a handle available --- zencore/include/zencore/filesystem.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'zencore/include') diff --git a/zencore/include/zencore/filesystem.h b/zencore/include/zencore/filesystem.h index b20a1e7c6..ba8588c5c 100644 --- a/zencore/include/zencore/filesystem.h +++ b/zencore/include/zencore/filesystem.h @@ -29,6 +29,10 @@ ZENCORE_API bool CreateDirectories(const std::filesystem::path& dir); ZENCORE_API bool CleanDirectory(const wchar_t* dir); ZENCORE_API bool CleanDirectory(const std::filesystem::path& dir); +/** Map native file handle to a path + */ +ZENCORE_API std::filesystem::path PathFromHandle(void* NativeHandle); + struct FileContents { std::vector Data; -- cgit v1.2.3