FPaths

Syntax

class FPaths

Remarks

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

Functions

Name Description

Public function Static

FString

 

AutomationDir()

The directory for automation save files

Public function Static

FString

 

AutomationLogDir()

The directory for automation log files.

Public function Static

FString

 

AutomationTransientDir()

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

Public function Static

FString

 

BugItDir()

Returns the directory the engine uses to output BugIt files.

screenshot directory

Public function Static

FString

 

ChangeExtension

(
    const FString & InPath,
    const FString & InNewExtension
)

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

Public function Static

FString

 

CloudDir()

The directory for local files used in cloud emulation or support

Public function Static

bool

 

CollapseRelativeDirectories

(
    FString & InPath
)

Takes a fully pathed string and eliminates relative pathing (eg: annihilates ".." with the adjacent directory).

Public function Static

FString

 

Combine

(
    PathTypes&&... InPaths
)

Protected function Static

void

 

CombineInternal

(
    FString & OutPath,
    const TCHAR ** Paths,
    int32 NumPaths
)

Public function Static

FString

 

ConvertFromSandboxPath

(
    const FString & InPath,
    const TCHAR * InSandboxName
)

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

Public function Static

FString

 

ConvertRelativePathToFull

(
    const FString & BasePath,
    const FString & InPath
)

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

Public function Static

FString

 

ConvertRelativePathToFull

(
    const FString & BasePath,
    FString && InPath
)

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

Public function Static

FString

 

ConvertRelativePathToFull

(
    FString && BasePath,
    const FString & InPath
)

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

Public function Static

FString

 

ConvertRelativePathToFull

(
    FString && BasePath,
    FString && InPath
)

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

Public function Static

FString

 

ConvertRelativePathToFull

(
    FString && InPath
)

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

Public function Static

FString

 

ConvertRelativePathToFull

(
    const FString & InPath
)

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

Public function Static

FString

 

ConvertToSandboxPath

(
    const FString & InPath,
    const TCHAR * InSandboxName
)

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

Public function Static

FString

 

CreateTempFilename

(
    const TCHAR * Path,
    const TCHAR * Prefix,
    const TCHAR * Extension
)

Creates a temporary filename with the specified prefix.

Public function Static

FString

 

DiffDir()

The directory for temp files used for diffing

Public function Static

bool

 

DirectoryExists

(
    const FString & InPath
)

True if this directory was found, false otherwise

Public function Static

FString

 

EngineConfigDir()

Returns the directory the root configuration files are located.

root config directory

Public function Static

FString

 

EngineContentDir()

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

Public function Static

FString

 

EngineDir()

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

Public function Static

FString

 

EngineIntermediateDir()

Returns the intermediate directory of the engine

content directory

Public function Static

FString

 

EnginePluginsDir()

Returns the plugins directory of the engine

Plugins directory.

Public function Static

FString

 

EngineSavedDir()

Returns the saved directory of the engine

Saved directory.

Public function Static

FString

 

EngineSourceDir()

The directory where engine source code files are kept

Public function Static

FString

 

EngineUserDir()

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

root user directory

Public function Static

FString

 

EngineVersionAgnosticUserDir()

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

Public function Static

FString

 

FeaturePackDir()

The directory where feature packs are kept

Public function Static

bool

 

FileExists

(
    const FString & InPath
)

True if this file was found, false otherwise

Public function Static

FString

 

GameAgnosticSavedDir()

Returns the saved directory that is not game specific.

Public function Static

FString

 

GameConfigDir()

Returns the directory the root configuration files are located.

root config directory

Public function Static

FString

 

GameContentDir()

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

Public function Static

FString

 

GameDevelopersDir()

The directory that contains subfolders for developer-specific content

Public function Static

FString

 

GameDir()

Returns the base directory of the current game by looking at FApp::GetGameName() .

Public function Static

FString

 

GameIntermediateDir()

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

Public function Static

FString

 

GameLogDir()

Returns the directory the engine uses to output logs.

Public function Static

FString

 

GamePersistentDownloadDir()

Returns the writable directory for downloaded data that persists across play sessions.

Public function Static

FString

 

GamePluginsDir()

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

Public function Static

FString

 

GameSavedDir()

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

Public function Static

FString

 

GameSourceDir()

The directory where game source code files are kept

Public function Static

FString

 

GameUserDeveloperDir()

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

Public function Static

FString

 

GameUserDir()

Returns the root directory for user-specific game files.

game user directory

Public function Static

FString

 

GeneratedConfigDir()

Returns the directory the engine saves generated config files.

config directory

Public function Static

FString

 

GetBaseFilename

(
    const FString & InPath,
    bool bRemovePath
)

Returns the same thing as GetCleanFilename, but without the extension.

Public function Static

FString

 

GetCleanFilename

(
    FString && InPath
)

Returns the filename (with extension), minus any path information.

Public function Static

FString

 

GetCleanFilename

(
    const FString & InPath
)

Returns the filename (with extension), minus any path information.

Public function Static

const TArray ...

 

GetEditorLocalizationPaths()

Returns a list of editor-specific localization paths

Public function Static

const TArray ...

 

GetEngineLocalizationPaths()

Returns a list of engine-specific localization paths

Public function Static

FString

 

GetExtension

(
    const FString & InPath,
    bool bIncludeDot
)

Gets the extension for this filename.

Public function Static

const TArray ...

 

GetGameLocalizationPaths()

Returns a list of game-specific localization paths

Public function Static

FString

 

GetPath

(
    FString && InPath
)

Returns the path in front of the filename.

Public function Static

FString

 

GetPath

(
    const FString & InPath
)

Returns the path in front of the filename.

Public function Static

const FStrin ...

 

GetProjectFilePath()

Gets the path to the project file.

Project file path.

Public function Static

const TArray ...

 

GetPropertyNameLocalizationPaths()

Returns a list of property name localization paths

Public function Static

const FStrin ...

 

GetRelativePathToRoot()

Gets the relative path to get from BaseDir to RootDirectory

Public function Static

const TArray ...

 

GetToolTipLocalizationPaths()

Returns a list of tool tip localization paths

Public function Static

bool

 

IsDrive

(
    const FString & InPath
)

True if this path represents a drive

Public function Static

bool

 

IsProjectFilePathSet()

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

Public function Static

bool

 

IsRelative

(
    const FString & InPath
)

True if this path is relative

Public function Static

bool

 

IsSamePath

(
    const FString & PathA,
    const FString & PathB
)

Checks if two paths are the same.

True if both paths are the same. False otherwise.

Public function Static

FString

 

LaunchDir()

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

Public function Static

bool

 

MakePathRelativeTo

(
    FString & InPath,
    const TCHAR * InRelativeTo
)

Assuming both paths (or filenames) are relative to the base dir, find the relative path to the InPath.

Public function Static

void

 

MakePlatformFilename

(
    FString & InPath
)

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

Public function Static

void

 

MakeStandardFilename

(
    FString & InPath
)

Make fully standard "Unreal" pathname:

Public function Static

void

 

NormalizeDirectoryName

(
    FString & InPath
)

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

Public function Static

void

 

NormalizeFilename

(
    FString & InPath
)

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

Public function Static

FString

 

ProfilingDir()

Returns the directory the engine uses to output profiling files.

log directory

Public function Static

void

 

RemoveDuplicateSlashes

(
    FString & InPath
)

Removes duplicate slashes in paths.

Public function Static

FString

 

RootDir()

Returns the root directory of the engine directory tree

Root directory.

Public function Static

FString

 

SandboxesDir()

Returns the directory the engine stores sandbox output

sandbox directory

Public function Static

FString

 

ScreenShotDir()

Returns the directory the engine uses to output screenshot files.

screenshot directory

Public function Static

FString

 

SetExtension

(
    const FString & InPath,
    const FString & InNewExtension
)

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

Public function Static

void

 

SetProjectFilePath

(
    const FString & NewGameProjectFileP...
)

Sets the path to the project file.

Public function Static

bool

 

ShouldSaveToUserDir()

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

Public function Static

FString

 

SourceConfigDir()

Returns the directory the engine uses to look for the source leaf ini files.

Public function Static

void

 

Split

(
    const FString & InPath,
    FString & PathPart,
    FString & FilenamePart,
    FString & ExtensionPart
)

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

Public function Static

bool

 

ValidatePath

(
    const FString & InPath,
    FText * OutReason
)

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

Public function Static

FString

 

VideoCaptureDir()

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

Constants

Name

Description

GameProjectFilePath

Holds the path to the currently loaded game project file.

References

Module

Core

Header

Runtime/Core/Public/Misc/Paths.h