From 732a1cb1e78abbabaa0d926e9b1e58a36538dc1b Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Tue, 22 Apr 2025 16:28:08 +0200 Subject: add cxxopts overload for parsing file paths from command line (#362) --- src/zencore/filesystem.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/zencore/filesystem.cpp') diff --git a/src/zencore/filesystem.cpp b/src/zencore/filesystem.cpp index ad796cb4a..018330d9b 100644 --- a/src/zencore/filesystem.cpp +++ b/src/zencore/filesystem.cpp @@ -2670,22 +2670,6 @@ SetFileReadOnly(const std::filesystem::path& Filename, bool ReadOnly) return Result; } -std::filesystem::path -StringToPath(const std::string_view& Path) -{ - std::string_view UnquotedPath = Path; - - if (Path.length() > 2 && Path.front() == '\"' && Path.back() == '\"') - { - UnquotedPath = Path.substr(1, Path.length() - 2); - } - if (UnquotedPath.ends_with('/') || UnquotedPath.ends_with('\\') || UnquotedPath.ends_with(std::filesystem::path::preferred_separator)) - { - UnquotedPath = UnquotedPath.substr(0, UnquotedPath.length() - 1); - } - return std::filesystem::path(UnquotedPath).make_preferred(); -} - ////////////////////////////////////////////////////////////////////////// // // Testing related code follows... -- cgit v1.2.3