From 97cfa86c2775fdfd7ddfc5d88b6283ccee5d6bbf Mon Sep 17 00:00:00 2001 From: Martin Ridgers Date: Thu, 16 Sep 2021 16:37:15 +0200 Subject: Use std::fd::path's character type for FileSysTraveral::Visitor API --- zencore/include/zencore/filesystem.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'zencore/include') diff --git a/zencore/include/zencore/filesystem.h b/zencore/include/zencore/filesystem.h index a5e4dcf80..66ab37e5c 100644 --- a/zencore/include/zencore/filesystem.h +++ b/zencore/include/zencore/filesystem.h @@ -69,10 +69,12 @@ class FileSystemTraversal public: struct TreeVisitor { - virtual void VisitFile(const std::filesystem::path& Parent, const std::wstring_view& File, uint64_t FileSize) = 0; + using path_view = std::basic_string_view; + + virtual void VisitFile(const std::filesystem::path& Parent, const path_view& File, uint64_t FileSize) = 0; // This should return true if we should recurse into the directory - virtual bool VisitDirectory(const std::filesystem::path& Parent, const std::wstring_view& DirectoryName) = 0; + virtual bool VisitDirectory(const std::filesystem::path& Parent, const path_view& DirectoryName) = 0; }; void TraverseFileSystem(const std::filesystem::path& RootDir, TreeVisitor& Visitor); -- cgit v1.2.3