UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PathViews.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6#include "CoreTypes.h"
7
8class FName;
9class FString;
10template <typename CharType> class TStringBuilderBase;
11template <typename FuncType> class TFunctionRef;
12
14{
15public:
28
41
54
56 UE_DEPRECATED(4.25, "FPathViews::GetBaseFilename(InPath, bRemovePath) has been superseded by "
57 "FPathViews::GetBaseFilename(InPath) and FPathViews::GetBaseFilenameWithPath(InPath).")
59
72
91
104
119
138
153
177
196
214 template <typename CharType, typename... ArgTypes>
215 static void Append(TStringBuilderBase<CharType>& Builder, ArgTypes&&... Args)
216 {
217 const auto AddSeparator = [&Builder]() -> TStringBuilderBase<CharType>&
218 {
219 if (!(Builder.Len() == 0 || Builder.LastChar() == '/' || Builder.LastChar() == '\\'))
220 {
221 Builder.AppendChar('/');
222 }
223 return Builder;
224 };
225 ((AddSeparator() << Args), ...);
226 }
227
238
247 static CORE_API FString SetExtension(const FStringView& InPath, const FStringView& InNewExtension);
248
250 static CORE_API bool IsSeparator(TCHAR c);
251
274
297 static CORE_API bool Less(FStringView A, FStringView B);
298
324
349
355
368
371
374
377
380
383
386
389
392
404
422
430
438};
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define Split(a, ahi, alo)
Definition Predicates.inl:204
Definition NameTypes.h:617
Definition PathViews.h:14
static CORE_API FString SetExtension(const FStringView &InPath, const FStringView &InNewExtension)
Definition PathViews.cpp:331
static CORE_API bool IsDriveSpecifierWithoutRoot(FStringView InPath)
Definition PathViews.cpp:934
static CORE_API void ToAbsolutePath(FStringView InPath, FStringBuilderBase &OutPath)
Definition PathViews.cpp:568
static CORE_API FStringView GetPathLeaf(const FStringView &InPath)
Definition PathViews.cpp:144
static CORE_API FStringView GetMountPointNameFromPath(const FStringView InPath, bool *bOutHadClassesPrefix=nullptr, bool bInWithoutSlashes=true)
Definition PathViews.cpp:1115
static CORE_API void AppendPath(FStringBuilderBase &InOutPath, FStringView AppendPath)
Definition PathViews.cpp:1093
static CORE_API void NormalizeDirectoryName(FStringBuilderBase &InOutPath)
Definition PathViews.cpp:579
static CORE_API bool HasRedundantTerminatingSeparator(FStringView A)
Definition PathViews.cpp:154
static CORE_API bool IsSeparator(TCHAR c)
Definition PathViews.cpp:360
static CORE_API void NormalizeFilename(FStringBuilderBase &InOutPath)
Definition PathViews.cpp:573
static CORE_API void SplitFirstComponent(FStringView InPath, FStringView &OutFirstComponent, FStringView &OutRemainder)
Definition PathViews.cpp:866
static CORE_API bool CollapseRelativeDirectories(FStringBuilderBase &InOutPath, bool bCollapseAllPossible=false)
Definition PathViews.cpp:837
static CORE_API FString ChangeExtension(const FStringView &InPath, const FStringView &InNewExtension)
Definition PathViews.cpp:299
static CORE_API void RemoveDuplicateSlashes(FStringBuilderBase &InOutPath)
Definition PathViews.cpp:844
static CORE_API FStringView GetCleanFilename(const FStringView &InPath)
Definition PathViews.cpp:100
static CORE_API bool IsPathLeaf(FStringView InPath)
Definition PathViews.cpp:205
static CORE_API FStringView GetBaseFilenameWithPath(const FStringView &InPath)
Definition PathViews.cpp:115
static CORE_API bool IsParentPathOf(FStringView Parent, FStringView Child)
Definition PathViews.cpp:470
UE_DEPRECATED(4.25, "FPathViews::GetBaseFilename(InPath, bRemovePath) has been superseded by " "FPathViews::GetBaseFilename(InPath) and FPathViews::GetBaseFilenameWithPath(InPath).") static CORE_API FStringView GetBaseFilename(const FStringView &InPath
static CORE_API FStringView GetExtension(const FStringView &InPath, bool bIncludeDot=false)
Definition PathViews.cpp:134
static CORE_API FStringView GetPath(const FStringView &InPath)
Definition PathViews.cpp:125
static CORE_API void ToAbsolutePathInline(FStringBuilderBase &InOutPath)
Definition PathViews.cpp:541
static CORE_API void SplitVolumeSpecifier(FStringView InPath, FStringView &OutVolumeSpecifier, FStringView &OutRemainder)
Definition PathViews.cpp:974
static CORE_API void IterateAncestors(FStringView InPath, TFunctionRef< bool(FStringView)> AncestorVisitor)
Definition PathViews.cpp:230
static CORE_API bool IsRelativePath(FStringView InPath)
Definition PathViews.cpp:476
bool bRemovePath
Definition PathViews.h:58
static CORE_API FStringView GetBaseFilename(const FStringView &InPath)
Definition PathViews.cpp:109
static CORE_API void IterateComponents(FStringView InPath, TFunctionRef< void(FStringView)> ComponentVisitor)
Definition PathViews.cpp:225
static CORE_API bool TryMakeChildPathRelativeTo(FStringView Child, FStringView Parent, FStringView &OutRelPath)
Definition PathViews.cpp:395
Definition AssetRegistryState.h:50
Definition StringBuilder.h:79
BuilderType & AppendChar(AppendedCharType Char)
Definition StringBuilder.h:260
@ false
Definition radaudio_common.h:23