diff options
Diffstat (limited to 'src/common/fs/path_util.h')
| -rw-r--r-- | src/common/fs/path_util.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/fs/path_util.h b/src/common/fs/path_util.h index 2874ea738..59301e7ed 100644 --- a/src/common/fs/path_util.h +++ b/src/common/fs/path_util.h | |||
| @@ -289,7 +289,11 @@ enum class DirectorySeparator { | |||
| 289 | 289 | ||
| 290 | // Splits the path on '/' or '\' and put the components into a vector | 290 | // Splits the path on '/' or '\' and put the components into a vector |
| 291 | // i.e. "C:\Users\Yuzu\Documents\save.bin" becomes {"C:", "Users", "Yuzu", "Documents", "save.bin" } | 291 | // i.e. "C:\Users\Yuzu\Documents\save.bin" becomes {"C:", "Users", "Yuzu", "Documents", "save.bin" } |
| 292 | [[nodiscard]] std::vector<std::string> SplitPathComponents(std::string_view filename); | 292 | [[nodiscard]] std::vector<std::string_view> SplitPathComponents(std::string_view filename); |
| 293 | |||
| 294 | // Splits the path on '/' or '\' and put the components into a vector | ||
| 295 | // i.e. "C:\Users\Yuzu\Documents\save.bin" becomes {"C:", "Users", "Yuzu", "Documents", "save.bin" } | ||
| 296 | [[nodiscard]] std::vector<std::string> SplitPathComponentsCopy(std::string_view filename); | ||
| 293 | 297 | ||
| 294 | // Removes trailing slash, makes all '\\' into '/', and removes duplicate '/'. Makes '/' into '\\' | 298 | // Removes trailing slash, makes all '\\' into '/', and removes duplicate '/'. Makes '/' into '\\' |
| 295 | // depending if directory_separator is BackwardSlash or PlatformDefault and running on windows | 299 | // depending if directory_separator is BackwardSlash or PlatformDefault and running on windows |
| @@ -298,7 +302,7 @@ enum class DirectorySeparator { | |||
| 298 | DirectorySeparator directory_separator = DirectorySeparator::ForwardSlash); | 302 | DirectorySeparator directory_separator = DirectorySeparator::ForwardSlash); |
| 299 | 303 | ||
| 300 | // Gets all of the text up to the last '/' or '\' in the path. | 304 | // Gets all of the text up to the last '/' or '\' in the path. |
| 301 | [[nodiscard]] std::string_view GetParentPath(std::string_view path); | 305 | [[nodiscard]] std::string GetParentPath(std::string_view path); |
| 302 | 306 | ||
| 303 | // Gets all of the text after the first '/' or '\' in the path. | 307 | // Gets all of the text after the first '/' or '\' in the path. |
| 304 | [[nodiscard]] std::string_view GetPathWithoutTop(std::string_view path); | 308 | [[nodiscard]] std::string_view GetPathWithoutTop(std::string_view path); |