Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FPathViews
Description
Split the given absolute or relative path into its topmost directory and the relative path from that directory. Directory elements of . and .. are currently not interpreted and are treated as literal characters. Callers should not rely on this behavior as it may be corrected in the future. callers should instead conform the paths before calling.
| Name | SplitFirstComponent |
| 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 SplitFirstComponent
(
FStringView InPath,
FStringView & OutFirstComponent,
FStringView & OutRemainder
)
Parameters
| Name | Remarks |
|---|---|
| InPath | The path to split. |
| OutFirstComponent | Receives the first directory element in the path, or InPath if it is a leaf path. |
| OutRemainder | Receives the relative path from OutFirstComponent to InPath, or empty if InPath is a leaf path. |