Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FPathViews
Description
Splits InPath into individual directory components, and calls ComponentVisitor on each. Note that this function does not properly handle Windows network paths such as //ShareName/Path and drive components such as C: (without trailing slash) may not be considered valid paths by some APIs.
Examples: "A/B.C" -> {"A", "B.C"} "A/B/C" -> {"A", "B", "C"} "../../A/B/C.D" -> {"..", "..", "A", "B", "C.D" } "/A/B/C" -> { "", "A", "B", "C" } "C:/A/B/C" -> { "C:", "A", "B", "C" } "//ShareName/Path" -> { "", "", "ShareName", "Path" }
| Name | IterateComponents |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/PathViews.h |
| Include Path | #include "Misc/PathViews.h" |
| Source | /Engine/Source/Runtime/Core/Private/Misc/PathViews.cpp |
static void IterateComponents
(
FStringView InPath,
TFunctionRef < void> ComponentVisitor
)