From 14d7568f9c7d970b7bbf7b6463a0a8530f98bb6f Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Wed, 20 Sep 2023 15:22:03 +0200 Subject: VFS implementation for local storage service (#396) currently, only Windows (using Projected File System) is supported --- src/zencore/include/zencore/filesystem.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/zencore/include') diff --git a/src/zencore/include/zencore/filesystem.h b/src/zencore/include/zencore/filesystem.h index a78edd16b..075188993 100644 --- a/src/zencore/include/zencore/filesystem.h +++ b/src/zencore/include/zencore/filesystem.h @@ -30,6 +30,10 @@ ZENCORE_API bool CreateDirectories(const std::filesystem::path& dir); */ ZENCORE_API bool CleanDirectory(const std::filesystem::path& dir); +/** Ensure directory exists and delete contents (if any) before returning + */ +ZENCORE_API bool CleanDirectoryExceptDotFiles(const std::filesystem::path& dir); + /** Map native file handle to a path */ ZENCORE_API std::filesystem::path PathFromHandle(void* NativeHandle); @@ -38,6 +42,10 @@ ZENCORE_API std::filesystem::path PathFromHandle(void* NativeHandle); */ ZENCORE_API std::filesystem::path PathFromHandle(void* NativeHandle, std::error_code& Ec); +/** Get canonical path name from a generic path + */ +ZENCORE_API std::filesystem::path CanonicalPath(std::filesystem::path InPath, std::error_code& Ec); + /** Query file size from native file handle */ ZENCORE_API uint64_t FileSizeFromHandle(void* NativeHandle); -- cgit v1.2.3