aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zen/cmds/run.cpp2
-rw-r--r--zencore/include/zencore/filesystem.h6
2 files changed, 5 insertions, 3 deletions
diff --git a/zen/cmds/run.cpp b/zen/cmds/run.cpp
index e5210f695..97680ed5a 100644
--- a/zen/cmds/run.cpp
+++ b/zen/cmds/run.cpp
@@ -80,7 +80,7 @@ RunCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
Visitor(const std::filesystem::path& RootPath) : m_RootPath(RootPath) {}
- virtual void VisitFile(const std::filesystem::path& Parent, const std::wstring_view& FileName, uint64_t FileSize) override
+ virtual void VisitFile(const std::filesystem::path& Parent, const path_view& FileName, uint64_t FileSize) override
{
std::filesystem::path FullPath = Parent / FileName;
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<std::filesystem::path::value_type>;
+
+ 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);