UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FPaths Class Reference

#include <Paths.h>

Classes

struct  FStaticData
 

Public Types

enum class  EPathConversion : uint8 {
  Engine_PlatformExtension , Engine_NotForLicensees , Engine_NoRedist , Engine_LimitedAccess ,
  Project_First , Project_PlatformExtension = Project_First , Project_NotForLicensees , Project_NoRedist ,
  Project_LimitedAccess
}
 
enum class  EGetExtensionDirsFlags : uint8 {
  None = 0 , WithBase = (1 << 0) , WithRestricted = (1 << 1) , WithPlatforms = (1 << 2) ,
  CheckPlatformsValid = (1 << 3) , Default = 0xFF
}
 

Public Member Functions

 FRIEND_ENUM_CLASS_FLAGS (EGetExtensionDirsFlags)
 

Static Public Member Functions

static CORE_API bool CanGetProjectDir ()
 
static CORE_API bool IsStaged ()
 
static CORE_API bool ShouldSaveToUserDir ()
 
static CORE_API FString LaunchDir ()
 
static CORE_API FString EngineDir ()
 
static CORE_API FString EngineUserDir ()
 
static CORE_API FString EngineVersionAgnosticUserDir ()
 
static CORE_API FString EngineContentDir ()
 
static CORE_API FString EngineConfigDir ()
 
static CORE_API FString EngineEditorSettingsDir ()
 
static CORE_API FString EngineIntermediateDir ()
 
static CORE_API FString EngineSavedDir ()
 
static CORE_API FString EnginePluginsDir ()
 
static CORE_API FString EngineDefaultLayoutDir ()
 
static CORE_API FString EngineProjectLayoutDir ()
 
static CORE_API FString EngineUserLayoutDir ()
 
static CORE_API FString EnterpriseDir ()
 
static CORE_API FString EnterprisePluginsDir ()
 
static CORE_API FString EnterpriseFeaturePackDir ()
 
static CORE_API FString EnginePlatformExtensionsDir ()
 
static FString EnginePlatformExtensionDir (const TCHAR *Platform)
 
static CORE_API FString ProjectPlatformExtensionsDir ()
 
static FString ProjectPlatformExtensionDir (const TCHAR *Platform)
 
static CORE_API FString ConvertPath (const FString &Path, EPathConversion Method, const TCHAR *ExtraData=nullptr, const TCHAR *OverrideProjectDir=nullptr)
 
static CORE_API TArray< FString > GetExtensionDirs (const FString &BaseDir, const FString &SubDir, bool bCheckValid)
 
static CORE_API TArray< FString > GetExtensionDirs (const FString &BaseDir, const FString &SubDir=FString(), EGetExtensionDirsFlags Flags=EGetExtensionDirsFlags::Default)
 
static CORE_API FString RootDir ()
 
static CORE_API FString ProjectDir ()
 
static CORE_API FString ProjectUserDir ()
 
static CORE_API FString ProjectContentDir ()
 
static CORE_API FString ProjectConfigDir ()
 
static CORE_API const FString & ProjectSavedDir ()
 
static CORE_API FString ProjectIntermediateDir ()
 
static CORE_API FString ShaderWorkingDir ()
 
static CORE_API FString ProjectPluginsDir ()
 
static CORE_API FString ProjectModsDir ()
 
static CORE_API bool HasProjectPersistentDownloadDir ()
 
static CORE_API FString ProjectPersistentDownloadDir ()
 
static CORE_API FString SourceConfigDir ()
 
static CORE_API FString GeneratedConfigDir ()
 
static CORE_API FString SandboxesDir ()
 
static CORE_API FString ProfilingDir ()
 
static CORE_API FString ScreenShotDir ()
 
static CORE_API FString BugItDir ()
 
static CORE_API FString VideoCaptureDir ()
 
static CORE_API FString AudioCaptureDir ()
 
static CORE_API FString ProjectLogDir ()
 
static CORE_API FString AutomationDir ()
 
static CORE_API FString AutomationTransientDir ()
 
static CORE_API FString AutomationReportsDir ()
 
static CORE_API FString AutomationLogDir ()
 
static CORE_API FString CloudDir ()
 
static CORE_API FString GameDevelopersDir ()
 
static CORE_API FStringView DevelopersFolderName ()
 
static CORE_API FString GameUserDeveloperFolderName ()
 
static CORE_API FString GameUserDeveloperDir ()
 
static CORE_API FString DiffDir ()
 
static CORE_API const TArray< FString > & GetEngineLocalizationPaths ()
 
static CORE_API const TArray< FString > & GetEditorLocalizationPaths ()
 
static TArray< FString > GetCookedEditorLocalizationPaths ()
 
static CORE_API const TArray< FString > & GetPropertyNameLocalizationPaths ()
 
static CORE_API const TArray< FString > & GetToolTipLocalizationPaths ()
 
static CORE_API const TArray< FString > & GetGameLocalizationPaths ()
 
static CORE_API FString GetPlatformLocalizationFolderName ()
 
static CORE_API const TArray< FString > & GetRestrictedFolderNames ()
 
static CORE_API bool IsRestrictedPath (const FString &InPath)
 
static CORE_API FString GameAgnosticSavedDir ()
 
static CORE_API FString EngineSourceDir ()
 
static CORE_API FString GameSourceDir ()
 
static CORE_API FString FeaturePackDir ()
 
static CORE_API bool IsProjectFilePathSet ()
 
static CORE_API FString GetProjectFilePath ()
 
static CORE_API void SetProjectFilePath (const FString &NewGameProjectFilePath)
 
static CORE_API FString GetExtension (const FString &InPath, bool bIncludeDot=false)
 
static CORE_API FString GetCleanFilename (const FString &InPath)
 
static CORE_API FString GetCleanFilenameUtf8 (const FUtf8String &InPath)
 
static CORE_API FString GetCleanFilename (FString &&InPath)
 
static CORE_API FString GetBaseFilename (const FString &InPath, bool bRemovePath=true)
 
static CORE_API FString GetBaseFilename (FString &&InPath, bool bRemovePath=true)
 
static CORE_API FString GetPath (const FString &InPath)
 
static CORE_API FString GetPath (FString &&InPath)
 
static CORE_API FString GetPathLeaf (const FString &InPath)
 
static CORE_API FString GetPathLeaf (FString &&InPath)
 
static CORE_API FString ChangeExtension (const FString &InPath, const FString &InNewExtension)
 
static CORE_API FString SetExtension (const FString &InPath, const FString &InNewExtension)
 
static CORE_API bool FileExists (const FString &InPath)
 
static CORE_API bool DirectoryExists (const FString &InPath)
 
static CORE_API bool IsDrive (const FString &InPath)
 
static CORE_API bool IsRelative (const FString &InPath)
 
static CORE_API void NormalizeFilename (FString &InPath)
 
static CORE_API FString FindCorrectCase (const FString &Path)
 
static CORE_API bool IsSamePath (const FString &PathA, const FString &PathB)
 
static CORE_API bool IsUnderDirectory (const FString &InPath, const FString &InDirectory)
 
static CORE_API void NormalizeDirectoryName (FString &InPath)
 
static CORE_API bool CollapseRelativeDirectories (FString &InPath, bool bCollapseAllPossible=false)
 
static CORE_API void RemoveDuplicateSlashes (FString &InPath)
 
static CORE_API FString RemoveDuplicateSlashes (const FString &InPath)
 
static CORE_API FString CreateStandardFilename (const FString &InPath)
 
static CORE_API void MakeStandardFilename (FString &InPath)
 
static CORE_API void MakePlatformFilename (FString &InPath)
 
static CORE_API bool MakePathRelativeTo (FString &InPath, const TCHAR *InRelativeTo)
 
static CORE_API FString ConvertRelativePathToFull (const FString &InPath)
 
static CORE_API FString ConvertRelativePathToFull (FString &&InPath)
 
static CORE_API FString ConvertRelativePathToFull (const FString &BasePath, const FString &InPath)
 
static CORE_API FString ConvertRelativePathToFull (const FString &BasePath, FString &&InPath)
 
static CORE_API FString ConvertRelativePathToFull (FString &&BasePath, const FString &InPath)
 
static CORE_API FString ConvertRelativePathToFull (FString &&BasePath, FString &&InPath)
 
static CORE_API FString ConvertToSandboxPath (const FString &InPath, const TCHAR *InSandboxName)
 
static CORE_API FString ConvertFromSandboxPath (const FString &InPath, const TCHAR *InSandboxName)
 
static CORE_API FString CreateTempFilename (const TCHAR *Path, const TCHAR *Prefix=TEXT(""), const TCHAR *Extension=TEXT(".tmp"))
 
static CORE_API FString GetInvalidFileSystemChars ()
 
static CORE_API FString MakeValidFileName (const FString &InString, const TCHAR InReplacementChar=TEXT('\0'))
 
static CORE_API bool ValidatePath (const FString &InPath, FText *OutReason=nullptr)
 
static CORE_API void Split (const FString &InPath, FString &PathPart, FString &FilenamePart, FString &ExtensionPart)
 
static CORE_API const FString & GetRelativePathToRoot ()
 
template<typename... PathTypes>
static UE_FORCEINLINE_HINT FString Combine (PathTypes &&... InPaths)
 
static CORE_API void TearDown ()
 

Static Protected Member Functions

static CORE_API FString CombineInternal (const FStringView *Paths, int32 NumPaths)
 
static void PlatformIndependentNormalizePath (FString &Path, bool bRemoveDuplicateSlashes, int32 &OutFirstColonIndex, int32 &OutFirstSlashIndex)
 

Detailed Description

Path helpers for retrieving game dir, engine dir, etc.

Member Enumeration Documentation

◆ EGetExtensionDirsFlags

Enumerator
None 
WithBase 
WithRestricted 
WithPlatforms 
CheckPlatformsValid 
Default 

◆ EPathConversion

Enumerator
Engine_PlatformExtension 
Engine_NotForLicensees 
Engine_NoRedist 
Engine_LimitedAccess 
Project_First 
Project_PlatformExtension 
Project_NotForLicensees 
Project_NoRedist 
Project_LimitedAccess 

Member Function Documentation

◆ AudioCaptureDir()

FString FPaths::AudioCaptureDir ( )
static

Returns the directory the engine uses to output user requested audio capture files.

Returns
Audio capture directory

◆ AutomationDir()

FString FPaths::AutomationDir ( )
static

Returns the directory for automation save files

◆ AutomationLogDir()

FString FPaths::AutomationLogDir ( )
static

Returns the directory for automation log files

◆ AutomationReportsDir()

FString FPaths::AutomationReportsDir ( )
static

Returns the directory for results of automation tests. May be deleted every run.

◆ AutomationTransientDir()

FString FPaths::AutomationTransientDir ( )
static

Returns the directory for automation save files that are meant to be deleted every run

◆ BugItDir()

FString FPaths::BugItDir ( )
static

Returns the directory the engine uses to output BugIt files.

Returns
screenshot directory

◆ CanGetProjectDir()

bool FPaths::CanGetProjectDir ( )
static
Returns
true if ProjectDir() is allowed to be called

◆ ChangeExtension()

FString FPaths::ChangeExtension ( const FString &  InPath,
const FString &  InNewExtension 
)
static

Changes the extension of the given filename (does nothing if the file has no extension)

◆ CloudDir()

FString FPaths::CloudDir ( )
static

Returns the directory for local files used in cloud emulation or support

◆ CollapseRelativeDirectories()

bool FPaths::CollapseRelativeDirectories ( FString &  InPath,
bool  bCollapseAllPossible = false 
)
static

Takes a fully pathed string and eliminates relative pathing (eg: annihilates ".." with the adjacent directory). Assumes all slashes have been converted to TEXT('/'). For example, takes the string: BaseDirectory/SomeDirectory/../SomeOtherDirectory/Filename.ext and converts it to: BaseDirectory/SomeOtherDirectory/Filename.ext

Parameters
bCollapseAllPossibleIf false, and there are leading .. that are uncollapsible, the function early exits and does not modify .. or . that occur later in the path. If true, the function collapses all . and .. that can be collapsed. Return value is the same in either case.
Returns
true if all directories were collapsed, else false.

◆ Combine()

template<typename... PathTypes>
static UE_FORCEINLINE_HINT FString FPaths::Combine ( PathTypes &&...  InPaths)
inlinestatic

◆ CombineInternal()

FString FPaths::CombineInternal ( const FStringView Paths,
int32  NumPaths 
)
staticprotected

◆ ConvertFromSandboxPath()

FString FPaths::ConvertFromSandboxPath ( const FString &  InPath,
const TCHAR InSandboxName 
)
static

Converts a sandbox (in Saved/Sandboxes) path to a normal path.

Parameters
InSandboxNameThe name of the sandbox.

◆ ConvertPath()

FString FPaths::ConvertPath ( const FString &  Path,
EPathConversion  Method,
const TCHAR ExtraData = nullptr,
const TCHAR OverrideProjectDir = nullptr 
)
static

Converts a path with the given method. Initially used for converting from normal paths to platform extensions (programs make it confusing, so haveing one source of truth is a good idea)

◆ ConvertRelativePathToFull() [1/6]

FString FPaths::ConvertRelativePathToFull ( const FString &  BasePath,
const FString &  InPath 
)
static

Converts a relative path name to a fully qualified name relative to the specified BasePath.

◆ ConvertRelativePathToFull() [2/6]

FString FPaths::ConvertRelativePathToFull ( const FString &  BasePath,
FString &&  InPath 
)
static

Converts a relative path name to a fully qualified name relative to the specified BasePath.

◆ ConvertRelativePathToFull() [3/6]

FString FPaths::ConvertRelativePathToFull ( const FString &  InPath)
static

Converts a relative path name to a fully qualified name relative to the process BaseDir().

◆ ConvertRelativePathToFull() [4/6]

FString FPaths::ConvertRelativePathToFull ( FString &&  BasePath,
const FString &  InPath 
)
static

Converts a relative path name to a fully qualified name relative to the specified BasePath.

◆ ConvertRelativePathToFull() [5/6]

FString FPaths::ConvertRelativePathToFull ( FString &&  BasePath,
FString &&  InPath 
)
static

Converts a relative path name to a fully qualified name relative to the specified BasePath.

◆ ConvertRelativePathToFull() [6/6]

FString FPaths::ConvertRelativePathToFull ( FString &&  InPath)
static

Converts a relative path name to a fully qualified name relative to the process BaseDir().

◆ ConvertToSandboxPath()

FString FPaths::ConvertToSandboxPath ( const FString &  InPath,
const TCHAR InSandboxName 
)
static

Converts a normal path to a sandbox path (in Saved/Sandboxes).

Parameters
InSandboxNameThe name of the sandbox.

◆ CreateStandardFilename()

FString FPaths::CreateStandardFilename ( const FString &  InPath)
static

Make fully standard "Unreal" pathname:

  • Normalizes path separators [NormalizeFilename]
  • Removes extraneous separators [NormalizeDirectoryName, as well removing adjacent separators]
  • Collapses internal ..'s
  • Makes relative to Engine\Binaries<Platform> (will ALWAYS start with ......)

◆ CreateTempFilename()

FString FPaths::CreateTempFilename ( const TCHAR Path,
const TCHAR Prefix = TEXT(""),
const TCHAR Extension = TEXT(".tmp") 
)
static

Creates a temporary filename with the specified prefix.

Parameters
PathThe file pathname.
PrefixThe file prefix.
ExtensionFile extension ('.' required).

◆ DevelopersFolderName()

FStringView FPaths::DevelopersFolderName ( )
static

Returns the name of the subfolder for developer-specific content Example: "Developers"

◆ DiffDir()

FString FPaths::DiffDir ( )
static

Returns the directory for temp files used for diffing

◆ DirectoryExists()

bool FPaths::DirectoryExists ( const FString &  InPath)
static

Returns true if this directory was found, false otherwise

◆ EngineConfigDir()

FString FPaths::EngineConfigDir ( )
static

Returns the directory the root configuration files are located.

Returns
root config directory

◆ EngineContentDir()

FString FPaths::EngineContentDir ( )
static

Returns the content directory of the "core" engine that can be shared across several games or across games & mods.

Returns
engine content directory

◆ EngineDefaultLayoutDir()

FString FPaths::EngineDefaultLayoutDir ( )
static

Returns the directory for default Editor UI Layout files of the engine

Returns
Directory for default Editor UI Layout files.

◆ EngineDir()

FString FPaths::EngineDir ( )
static

Returns the base directory of the "core" engine that can be shared across several games or across games & mods. Shaders and base localization files e.g. reside in the engine directory.

Returns
engine directory

◆ EngineEditorSettingsDir()

FString FPaths::EngineEditorSettingsDir ( )
static

Returns the Editor Settings directory of the engine

Returns
Editor Settings directory.

◆ EngineIntermediateDir()

FString FPaths::EngineIntermediateDir ( )
static

Returns the intermediate directory of the engine

Returns
content directory

◆ EnginePlatformExtensionDir()

static FString FPaths::EnginePlatformExtensionDir ( const TCHAR Platform)
inlinestatic

Returns the directory where the engine's platform extensions resides for the given platform

Parameters
Platformthe platform to get the extension directory for
Returns
engine's platform extension directory

◆ EnginePlatformExtensionsDir()

FString FPaths::EnginePlatformExtensionsDir ( )
static

Returns the directory where engine platform extensions reside

Returns
engine platform extensions directory

◆ EnginePluginsDir()

FString FPaths::EnginePluginsDir ( )
static

Returns the plugins directory of the engine

Returns
Plugins directory.

◆ EngineProjectLayoutDir()

FString FPaths::EngineProjectLayoutDir ( )
static

Returns the directory for project Editor UI Layout files of the engine

Returns
Directory for project Editor UI Layout files.

◆ EngineSavedDir()

FString FPaths::EngineSavedDir ( )
static

Returns the saved directory of the engine

Returns
Saved directory.

◆ EngineSourceDir()

FString FPaths::EngineSourceDir ( )
static

Returns the directory where engine source code files are kept

◆ EngineUserDir()

FString FPaths::EngineUserDir ( )
static

Returns the root directory for user-specific engine files. Always writable.

Returns
root user directory

◆ EngineUserLayoutDir()

FString FPaths::EngineUserLayoutDir ( )
static

Returns the directory for user-generated Editor UI Layout files of the engine

Returns
Directory for user-generated Editor UI Layout files.

◆ EngineVersionAgnosticUserDir()

FString FPaths::EngineVersionAgnosticUserDir ( )
static

Returns the root directory for user-specific engine files which can be shared between versions. Always writable.

Returns
root user directory

◆ EnterpriseDir()

FString FPaths::EnterpriseDir ( )
static

Returns the base directory enterprise directory.

Returns
enterprise directory

◆ EnterpriseFeaturePackDir()

FString FPaths::EnterpriseFeaturePackDir ( )
static

Returns the enterprise FeaturePack directory

Returns
FeaturePack directory.

◆ EnterprisePluginsDir()

FString FPaths::EnterprisePluginsDir ( )
static

Returns the enterprise plugins directory

Returns
Plugins directory.

◆ FeaturePackDir()

FString FPaths::FeaturePackDir ( )
static

Returns the directory where feature packs are kept

◆ FileExists()

bool FPaths::FileExists ( const FString &  InPath)
static

Returns true if this file was found, false otherwise

◆ FindCorrectCase()

FString FPaths::FindCorrectCase ( const FString &  Path)
static

Converts the path casing to match the casing found on disk without resolving directory junctions

◆ FRIEND_ENUM_CLASS_FLAGS()

FPaths::FRIEND_ENUM_CLASS_FLAGS ( EGetExtensionDirsFlags  )

◆ GameAgnosticSavedDir()

FString FPaths::GameAgnosticSavedDir ( )
static

Returns the saved directory that is not game specific. This is usually the same as EngineSavedDir().

Returns
saved directory

◆ GameDevelopersDir()

FString FPaths::GameDevelopersDir ( )
static

Returns the directory that contains subfolders for developer-specific content Example: "../../../ProjectName/Content/Developers

◆ GameSourceDir()

FString FPaths::GameSourceDir ( )
static

Returns the directory where game source code files are kept

◆ GameUserDeveloperDir()

FString FPaths::GameUserDeveloperDir ( )
static

Returns The directory that contains developer-specific content for the current user

◆ GameUserDeveloperFolderName()

FString FPaths::GameUserDeveloperFolderName ( )
static

Returns The folder name for the developer-specific directory for the current user

◆ GeneratedConfigDir()

FString FPaths::GeneratedConfigDir ( )
static

Returns the directory the engine saves generated config files.

Returns
config directory

◆ GetBaseFilename() [1/2]

FString FPaths::GetBaseFilename ( const FString &  InPath,
bool  bRemovePath = true 
)
static

◆ GetBaseFilename() [2/2]

FString FPaths::GetBaseFilename ( FString &&  InPath,
bool  bRemovePath = true 
)
static

◆ GetCleanFilename() [1/2]

FString FPaths::GetCleanFilename ( const FString &  InPath)
static

◆ GetCleanFilename() [2/2]

FString FPaths::GetCleanFilename ( FString &&  InPath)
static

◆ GetCleanFilenameUtf8()

FString FPaths::GetCleanFilenameUtf8 ( const FUtf8String InPath)
static

◆ GetCookedEditorLocalizationPaths()

static TArray< FString > FPaths::GetCookedEditorLocalizationPaths ( )
inlinestatic

Returns a list of cooked editor-specific localization paths

◆ GetEditorLocalizationPaths()

const TArray< FString > & FPaths::GetEditorLocalizationPaths ( )
static

Returns a list of editor-specific localization paths

◆ GetEngineLocalizationPaths()

const TArray< FString > & FPaths::GetEngineLocalizationPaths ( )
static

Returns a list of engine-specific localization paths

◆ GetExtension()

FString FPaths::GetExtension ( const FString &  InPath,
bool  bIncludeDot = false 
)
static

Gets the extension for this filename.

Parameters
bIncludeDotif true, includes the leading dot in the result
Returns
the extension of this filename, or an empty string if the filename doesn't have an extension.

◆ GetExtensionDirs() [1/2]

TArray< FString > FPaths::GetExtensionDirs ( const FString &  BaseDir,
const FString &  SubDir,
bool  bCheckValid 
)
static

Returns platform and restricted extensions that are present and if bCheckValid is set, valid (for platforms, it uses FDataDrivenPlatformInfo to determine valid platforms, it doesn't just use what's present)

Returns
BaseDir and usable extension directories under BaseDir (either Engine or Project)

◆ GetExtensionDirs() [2/2]

TArray< FString > FPaths::GetExtensionDirs ( const FString &  BaseDir,
const FString &  SubDir = FString(),
EGetExtensionDirsFlags  Flags = EGetExtensionDirsFlags::Default 
)
static

Returns platform and restricted extensions that are present and if CheckPlatformsValid is set, valid (for platforms, it uses FDataDrivenPlatformInfo to determine valid platforms, it doesn't just use what's present)

Returns
BaseDir and usable extension directories under BaseDir (either Engine or Project)

◆ GetGameLocalizationPaths()

const TArray< FString > & FPaths::GetGameLocalizationPaths ( )
static

Returns a list of game-specific localization paths

◆ GetInvalidFileSystemChars()

FString FPaths::GetInvalidFileSystemChars ( )
static

Returns a string containing all invalid characters as dictated by the operating system

◆ GetPath() [1/2]

FString FPaths::GetPath ( const FString &  InPath)
static

◆ GetPath() [2/2]

FString FPaths::GetPath ( FString &&  InPath)
static

◆ GetPathLeaf() [1/2]

FString FPaths::GetPathLeaf ( const FString &  InPath)
static

◆ GetPathLeaf() [2/2]

FString FPaths::GetPathLeaf ( FString &&  InPath)
static

◆ GetPlatformLocalizationFolderName()

FString FPaths::GetPlatformLocalizationFolderName ( )
static

Get the name of the platform-specific localization sub-folder

◆ GetProjectFilePath()

FString FPaths::GetProjectFilePath ( )
static

Gets the path to the project file.

Returns
Project file path.

◆ GetPropertyNameLocalizationPaths()

const TArray< FString > & FPaths::GetPropertyNameLocalizationPaths ( )
static

Returns a list of property name localization paths

◆ GetRelativePathToRoot()

const FString & FPaths::GetRelativePathToRoot ( )
static

Gets the relative path to get from BaseDir to RootDirectory

◆ GetRestrictedFolderNames()

const TArray< FString > & FPaths::GetRestrictedFolderNames ( )
static

Returns a list of restricted/internal folder names (without any slashes) which may be tested against full paths to determine if a path is restricted or not.

◆ GetToolTipLocalizationPaths()

const TArray< FString > & FPaths::GetToolTipLocalizationPaths ( )
static

Returns a list of tool tip localization paths

◆ HasProjectPersistentDownloadDir()

bool FPaths::HasProjectPersistentDownloadDir ( )
static

◆ IsDrive()

bool FPaths::IsDrive ( const FString &  InPath)
static

Returns true if this path represents a root drive or volume

◆ IsProjectFilePathSet()

bool FPaths::IsProjectFilePathSet ( )
static

Checks whether the path to the project file, if any, is set.

Returns
true if the path is set, false otherwise.

◆ IsRelative()

bool FPaths::IsRelative ( const FString &  InPath)
static

Returns true if this path is relative to another path

◆ IsRestrictedPath()

bool FPaths::IsRestrictedPath ( const FString &  InPath)
static

Determines if supplied path uses a restricted/internal subdirectory. Note that slashes are normalized and character case is ignored for the comparison.

◆ IsSamePath()

bool FPaths::IsSamePath ( const FString &  PathA,
const FString &  PathB 
)
static

Checks if two paths are the same.

Parameters
PathAFirst path to check.
PathBSecond path to check.
Returns
True if both paths are the same. False otherwise.

◆ IsStaged()

bool FPaths::IsStaged ( )
static
Returns
true if the build has been staged and uses the simplified remapped directory structure made when staging

◆ IsUnderDirectory()

bool FPaths::IsUnderDirectory ( const FString &  InPath,
const FString &  InDirectory 
)
static

Determines if a path is under a given directory

◆ LaunchDir()

FString FPaths::LaunchDir ( )
static

Returns the directory the application was launched from (useful for commandline utilities)

◆ MakePathRelativeTo()

bool FPaths::MakePathRelativeTo ( FString &  InPath,
const TCHAR InRelativeTo 
)
static

Assuming both paths (or filenames) are relative to the same base dir, modifies InPath to be relative to InRelativeTo

Parameters
InPathPath to change to be relative to InRelativeTo
InRelativeToPath to use as the new relative base
Returns
true if InPath was changed to be relative

◆ MakePlatformFilename()

void FPaths::MakePlatformFilename ( FString &  InPath)
static

Takes an "Unreal" pathname and converts it to a platform filename.

◆ MakeStandardFilename()

void FPaths::MakeStandardFilename ( FString &  InPath)
static

◆ MakeValidFileName()

FString FPaths::MakeValidFileName ( const FString &  InString,
const TCHAR  InReplacementChar = TEXT('\0') 
)
static

Returns a string that is safe to use as a filename because all items in GetInvalidFileSystemChars() are removed

◆ NormalizeDirectoryName()

void FPaths::NormalizeDirectoryName ( FString &  InPath)
static

Normalize all / and \ to TEXT("/") and remove any trailing TEXT("/") if the character before that is not a TEXT("/") or a colon

◆ NormalizeFilename()

void FPaths::NormalizeFilename ( FString &  InPath)
static

Convert all / and \ to TEXT("/")

◆ PlatformIndependentNormalizePath()

void FPaths::PlatformIndependentNormalizePath ( FString &  Path,
bool  bRemoveDuplicateSlashes,
int32 OutFirstColonIndex,
int32 OutFirstSlashIndex 
)
staticprotected

Helper function to reduce duplication between NormalizeFilename and other functions that need to normalize while also doing other transformations. Does not do all steps of NormalizeFilename, see the comments in the function for details of which steps it handles.

◆ ProfilingDir()

FString FPaths::ProfilingDir ( )
static

Returns the directory the engine uses to output profiling files.

Returns
log directory

◆ ProjectConfigDir()

FString FPaths::ProjectConfigDir ( )
static

Returns the directory the root configuration files are located.

Returns
root config directory

◆ ProjectContentDir()

FString FPaths::ProjectContentDir ( )
static

Returns the content directory of the current game by looking at FApp::GetProjectName().

Returns
content directory

◆ ProjectDir()

FString FPaths::ProjectDir ( )
static

Returns the base directory of the current project by looking at FApp::GetProjectName(). This is usually a subdirectory of the installation root directory and can be overridden on the command line to allow self contained mod support.

Returns
base directory

◆ ProjectIntermediateDir()

FString FPaths::ProjectIntermediateDir ( )
static

Returns the intermediate directory of the current game by looking at FApp::GetProjectName().

Returns
intermediate directory

◆ ProjectLogDir()

FString FPaths::ProjectLogDir ( )
static

Returns the directory the engine uses to output logs. This currently can't be an .ini setting as the game starts logging before it can read from .ini files.

Returns
log directory

◆ ProjectModsDir()

FString FPaths::ProjectModsDir ( )
static

Returns the mods directory of the current project by looking at FApp::GetProjectName().

Returns
mods directory

◆ ProjectPersistentDownloadDir()

FString FPaths::ProjectPersistentDownloadDir ( )
static

◆ ProjectPlatformExtensionDir()

static FString FPaths::ProjectPlatformExtensionDir ( const TCHAR Platform)
inlinestatic

Returns the directory where the project's platform extensions resides for the given platform

Parameters
Platformthe platform to get the extension directory for
Returns
project's platform extension directory

◆ ProjectPlatformExtensionsDir()

FString FPaths::ProjectPlatformExtensionsDir ( )
static

Returns the directory where the project's platform extensions reside

Returns
project platform extensions directory

◆ ProjectPluginsDir()

FString FPaths::ProjectPluginsDir ( )
static

Returns the plugins directory of the current game by looking at FApp::GetProjectName().

Returns
plugins directory

◆ ProjectSavedDir()

const FString & FPaths::ProjectSavedDir ( )
static

Returns the saved directory of the current game by looking at FApp::GetProjectName().

Returns
saved directory

◆ ProjectUserDir()

FString FPaths::ProjectUserDir ( )
static

Returns the root directory for user-specific game files.

Returns
game user directory

◆ RemoveDuplicateSlashes() [1/2]

FString FPaths::RemoveDuplicateSlashes ( const FString &  InPath)
static

Returns a copy of the given path on which duplicate slashes were removed (see the inplace version for more details).

◆ RemoveDuplicateSlashes() [2/2]

void FPaths::RemoveDuplicateSlashes ( FString &  InPath)
static

Removes duplicate slashes in paths. Assumes all slashes have been converted to TEXT('/'). For example, takes the string: BaseDirectory/SomeDirectory//SomeOtherDirectory////Filename.ext and converts it to: BaseDirectory/SomeDirectory/SomeOtherDirectory/Filename.ext

◆ RootDir()

FString FPaths::RootDir ( )
static

Returns the root directory of the engine directory tree

Returns
Root directory.

◆ SandboxesDir()

FString FPaths::SandboxesDir ( )
static

Returns the directory the engine stores sandbox output

Returns
sandbox directory

◆ ScreenShotDir()

FString FPaths::ScreenShotDir ( )
static

Returns the directory the engine uses to output screenshot files.

Returns
screenshot directory

◆ SetExtension()

FString FPaths::SetExtension ( const FString &  InPath,
const FString &  InNewExtension 
)
static

Sets the extension of the given filename (like ChangeExtension, but also applies the extension if the file doesn't have one)

◆ SetProjectFilePath()

void FPaths::SetProjectFilePath ( const FString &  NewGameProjectFilePath)
static

Sets the path to the project file.

Parameters
NewGameProjectFilePath- The project file path to set.

◆ ShaderWorkingDir()

FString FPaths::ShaderWorkingDir ( )
static

◆ ShouldSaveToUserDir()

bool FPaths::ShouldSaveToUserDir ( )
static

Should the "saved" directory structures be rooted in the user dir or relative to the "engine/game"

◆ SourceConfigDir()

FString FPaths::SourceConfigDir ( )
static

Returns the directory the engine uses to look for the source leaf ini files. This can't be an .ini variable for obvious reasons.

Returns
source config directory

◆ Split()

void FPaths::Split ( const FString &  InPath,
FString &  PathPart,
FString &  FilenamePart,
FString &  ExtensionPart 
)
static

Parses a fully qualified or relative filename into its components (filename, path, extension).

Parameters
InPath[in] Full filename path
PathPart[out] receives the value of the path portion of the input string
FilenamePart[out] receives the value of the filename portion of the input string
ExtensionPart[out] receives the value of the extension portion of the input string

◆ TearDown()

void FPaths::TearDown ( )
static

Frees any memory retained by FPaths.

◆ ValidatePath()

bool FPaths::ValidatePath ( const FString &  InPath,
FText OutReason = nullptr 
)
static

Validates that the parts that make up the path contain no invalid characters as dictated by the operating system Note that this is a different set of restrictions to those imposed by FPackageName

Parameters
InPath- path to validate
OutReason- optional parameter to fill with the failure reason

◆ VideoCaptureDir()

FString FPaths::VideoCaptureDir ( )
static

Returns the directory the engine uses to output user requested video capture files.

Returns
Video capture directory

The documentation for this class was generated from the following files: