aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/include
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-05-09 17:19:57 +0200
committerGitHub <[email protected]>2023-05-09 17:19:57 +0200
commit835f14403d5f6e04d65b761857ee1271a4e7fe98 (patch)
tree4a5b69325e7b468e1fdabc2bfd296f4e0b647175 /src/zencore/include
parentfixed merge error (diff)
downloadzen-835f14403d5f6e04d65b761857ee1271a4e7fe98.tar.xz
zen-835f14403d5f6e04d65b761857ee1271a4e7fe98.zip
add context to MapViewOfFile errors (#282)
* added FileSizeFromHandle function * added file size to error message when MapViewOfFile fails
Diffstat (limited to 'src/zencore/include')
-rw-r--r--src/zencore/include/zencore/filesystem.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zencore/include/zencore/filesystem.h b/src/zencore/include/zencore/filesystem.h
index fa5f94170..230d8d1c2 100644
--- a/src/zencore/include/zencore/filesystem.h
+++ b/src/zencore/include/zencore/filesystem.h
@@ -1,4 +1,5 @@
// Copyright Epic Games, Inc. All Rights Reserved.
+// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
@@ -32,6 +33,10 @@ ZENCORE_API bool CleanDirectory(const std::filesystem::path& dir);
*/
ZENCORE_API std::filesystem::path PathFromHandle(void* NativeHandle);
+/** Query file size from native file handle
+ */
+ZENCORE_API uint64_t FileSizeFromHandle(void* NativeHandle);
+
ZENCORE_API std::filesystem::path GetRunningExecutablePath();
/** Set the max open file handle count to max allowed for the current process on Linux and MacOS