Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FPathViews
Description
Return whether Parent is a parent path of (or is equal to) Child. Case-insensitive / is treated as equal to \ Presence or absence of terminating separator (/) is ignored in the comparison. 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. Relative paths and absolute paths are not resolved, and relative paths will never equal absolute paths. Callers should not rely on this behavior as it may be corrected in the future; callers should instead conform the paths before calling. Examples: ("../A", "../A/B") -> true ("../A/", "../A\B") -> true ("../A", "../A/") -> true ("../A", ".././A/") -> false ("d:/root/Engine", "../../../Engine") -> false
| Name | IsParentPathOf |
| 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 bool IsParentPathOf
(
FStringView Parent,
FStringView Child
)
True if and only if Child is a child path of Parent (or is equal to it).
Parameters
| Name | Remarks |
|---|---|
| Parent | An absolute path that may be a parent path of Child. |
| Child | An absolute path that may be a child path of Parent. |