diff options
| author | Dan Engelbrecht <[email protected]> | 2025-04-22 16:28:08 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-04-22 16:28:08 +0200 |
| commit | 732a1cb1e78abbabaa0d926e9b1e58a36538dc1b (patch) | |
| tree | 08d47d333f68e2f99ec7ec922fa72dea4ee96dbc /src/zencore/filesystem.cpp | |
| parent | xmake updatefrontend (diff) | |
| download | zen-732a1cb1e78abbabaa0d926e9b1e58a36538dc1b.tar.xz zen-732a1cb1e78abbabaa0d926e9b1e58a36538dc1b.zip | |
add cxxopts overload for parsing file paths from command line (#362)
Diffstat (limited to 'src/zencore/filesystem.cpp')
| -rw-r--r-- | src/zencore/filesystem.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
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... |