Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Misc
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Misc/PathViews.h |
| Include | #include "Misc/PathViews.h" |
Syntax
class FPathViews
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Append
(
TStringBuilderBase< CharType >& Builder, |
Appends each suffix argument to the path in the builder and ensures that there is a separator between them. | |
| void | AppendPath
(
FStringBuilderBase& InOutPath, |
If AppendPath is a relative path, append it as a relative path onto InOutPath. | |
| FString | ChangeExtension
(
const FStringView& InPath, |
Replaces the pre-existing file extension of a filename. | |
| bool | CollapseRelativeDirectories
(
FStringBuilderBase& InOutPath |
Collapses redundant paths like "/./" and "SkipDir/..". | |
| bool | Equals
(
FStringView A, |
Return true if the given paths are the same path (with exceptions noted below). | |
| FStringView | GetBaseFilename
(
const FStringView& InPath |
Returns the portion of the path after the last separator and before the last dot. | |
| FStringView | GetBaseFilenameWithPath
(
const FStringView& InPath |
Returns the portion of the path before the last dot. | |
| FStringView | GetCleanFilename
(
const FStringView& InPath |
Returns the portion of the path after the last separator. | |
| FStringView | GetMountPointNameFromPath
(
const FStringView InPath, |
Returns the name of the mount point in a path Removes starting forward slash and Classes_ prefix if bInWithoutSlashes is true Example: "/Classes_A/Textures" returns "A" and sets bOutHadClassesPrefix=true if bInWithoutSlashes is true returns "/Classes_A" otherwise and sets bOutHadClassesPrefix=false | |
| bool | Report whether the path has an unneeded trailing slash. | ||
| bool | IsParentPathOf
(
FStringView Parent, |
Return whether Parent is a parent path of (or is equal to) Child. | |
| bool | IsRelativePath
(
FStringView InPath |
Return whether the given path is a relativepath - does not start with a separator or volume:. | |
| bool | IsSeparator
(
TCHAR c |
Return whether the given character is a path-separator character (/ or ) | |
| FPathViews::GetBaseFilename(InPath) and FPathViews void | IterateAncestors
(
FStringView InPath, |
Returns the portion of the path before the last dot and optionally after the last separator. | |
| bool | Less
(
FStringView A, |
Return true if the the first path is lexicographically less than the second path (with caveats noted below). | |
| void | NormalizeDirectoryName
(
FStringBuilderBase& InOutPath |
Normalize and remove trailing slash unless the preceding character is '/' or ':' | |
| void | NormalizeFilename
(
FStringBuilderBase& InOutPath |
Convert \ to / and do platform-specific normalization | |
| void | RemoveDuplicateSlashes
(
FStringBuilderBase& InOutPath |
Removes duplicate forward slashes, e.g. "a/b//c////f.e" -> "a/b/c/f.e" | |
| FString | SetExtension
(
const FStringView& InPath, |
Sets the file extension of a filename. | |
| void | Split
(
const FStringView& InPath, |
Splits a path into three parts, any of which may be empty: the path, the clean name, and the extension. | |
| void | SplitFirstComponent
(
FStringView InPath, |
Split the given absolute or relative path into its topmost directory and the relative path from that directory. | |
| void | SplitVolumeSpecifier
(
FStringView InPath, |
Split the path into a volume specifier and the rest of the path. | |
| void | ToAbsolutePath
(
FStringView InPath, |
Convert to absolute using process BaseDir(), normalize and append. | |
| void | ToAbsolutePath
(
FStringView BasePath, |
Convert to absolute using explicit BasePath, normalize and append. | |
| void | ToAbsolutePathInline
(
FStringBuilderBase& InOutPath |
Convert to absolute using process BaseDir() and normalize inlined. | |
| void | ToAbsolutePathInline
(
FStringView BasePath, |
Convert to absolute using explicit BasePath and normalize inlined. | |
| bool | TryMakeChildPathRelativeTo
(
FStringView Child, |
Check whether Parent is a parent path of Child and report the relative path if so. |