engine
 
载入中...
搜索中...
未找到
静态 Public 成员函数 | 所有成员列表
FPaths类 参考

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

#include <Paths.h>

静态 Public 成员函数

static FString AutomationDir ()
 Returns the directory for automation save files
 
static FString AutomationLogDir ()
 Returns the directory for automation log files
 
static FString AutomationReportsDir ()
 Returns the directory for results of automation tests. 更多...
 
static FString AutomationTransientDir ()
 Returns the directory for automation save files that are meant to be deleted every run
 
static FString BugItDir ()
 Returns the directory the engine uses to output BugIt files. 更多...
 
static FString ChangeExtension (const FString &InPath, const FString &InNewExtension)
 Changes the extension of the given filename (does nothing if the file has no extension)
 
static FString CloudDir ()
 Returns the directory for local files used in cloud emulation or support
 
static bool CollapseRelativeDirectories (FString &InPath)
 Takes a fully pathed string and eliminates relative pathing (eg: annihilates ".." with the adjacent directory). 更多...
 
static FString ConvertFromSandboxPath (const FString &InPath, const TCHAR *InSandboxName)
 Converts a sandbox (in Saved/Sandboxes) path to a normal path. 更多...
 
static FString ConvertRelativePathToFull (const FString &BasePath, const FString &InPath)
 Converts a relative path name to a fully qualified name relative to the specified BasePath.
 
static FString ConvertRelativePathToFull (const FString &BasePath, FString &&InPath)
 Converts a relative path name to a fully qualified name relative to the specified BasePath.
 
static FString ConvertRelativePathToFull (const FString &InPath)
 Converts a relative path name to a fully qualified name relative to the process BaseDir().
 
static FString ConvertRelativePathToFull (FString &&BasePath, const FString &InPath)
 Converts a relative path name to a fully qualified name relative to the specified BasePath.
 
static FString ConvertRelativePathToFull (FString &&BasePath, FString &&InPath)
 Converts a relative path name to a fully qualified name relative to the specified BasePath.
 
static FString ConvertRelativePathToFull (FString &&InPath)
 Converts a relative path name to a fully qualified name relative to the process BaseDir().
 
static FString ConvertToSandboxPath (const FString &InPath, const TCHAR *InSandboxName)
 Converts a normal path to a sandbox path (in Saved/Sandboxes). 更多...
 
static FString CreateStandardFilename (const FString &InPath)
 Make fully standard "Unreal" pathname: 更多...
 
static FString CreateTempFilename (const TCHAR *Path, const TCHAR *Prefix=TEXT(""), const TCHAR *Extension=TEXT(".tmp"))
 Creates a temporary filename with the specified prefix. 更多...
 
static FString DiffDir ()
 Returns the directory for temp files used for diffing
 
static bool DirectoryExists (const FString &InPath)
 Returns true if this directory was found, false otherwise
 
static FString EngineConfigDir ()
 Returns the directory the root configuration files are located. 更多...
 
static FString EngineContentDir ()
 Returns the content directory of the "core" engine that can be shared across several games or across games & mods. 更多...
 
static FString EngineDefaultLayoutDir ()
 Returns the directory for default Editor UI Layout files of the engine 更多...
 
static FString EngineDir ()
 Returns the base directory of the "core" engine that can be shared across several games or across games & mods. 更多...
 
static FString EngineEditorSettingsDir ()
 Returns the Editor Settings directory of the engine 更多...
 
static FString EngineIntermediateDir ()
 Returns the intermediate directory of the engine 更多...
 
static FString EnginePlatformExtensionsDir ()
 Returns the directory where engine platform extensions reside 更多...
 
static FString EnginePluginsDir ()
 Returns the plugins directory of the engine 更多...
 
static FString EngineProjectLayoutDir ()
 Returns the directory for project Editor UI Layout files of the engine 更多...
 
static FString EngineSavedDir ()
 Returns the saved directory of the engine 更多...
 
static FString EngineSourceDir ()
 Returns the directory where engine source code files are kept
 
static FString EngineUserDir ()
 Returns the root directory for user-specific engine files. 更多...
 
static FString EngineUserLayoutDir ()
 Returns the directory for user-generated Editor UI Layout files of the engine 更多...
 
static FString EngineVersionAgnosticUserDir ()
 Returns the root directory for user-specific engine files which can be shared between versions. 更多...
 
static FString EnterpriseDir ()
 Returns the base directory enterprise directory. 更多...
 
static FString EnterpriseFeaturePackDir ()
 Returns the enterprise FeaturePack directory 更多...
 
static FString EnterprisePluginsDir ()
 Returns the enterprise plugins directory 更多...
 
static FString FeaturePackDir ()
 Returns the directory where feature packs are kept
 
static bool FileExists (const FString &InPath)
 Returns true if this file was found, false otherwise
 
static FString GameAgnosticSavedDir ()
 Returns the saved directory that is not game specific. 更多...
 
static FString GameDevelopersDir ()
 Returns the directory that contains subfolders for developer-specific content
 
static FString GameSourceDir ()
 Returns the directory where game source code files are kept
 
static FString GameUserDeveloperDir ()
 Returns The directory that contains developer-specific content for the current user
 
static FString GameUserDeveloperFolderName ()
 Returns The folder name for the developer-specific directory for the current user
 
static FString GeneratedConfigDir ()
 Returns the directory the engine saves generated config files. 更多...
 
static const TArray< FString > & GetEditorLocalizationPaths ()
 Returns a list of editor-specific localization paths
 
static const TArray< FString > & GetEngineLocalizationPaths ()
 Returns a list of engine-specific localization paths
 
static FString GetExtension (const FString &InPath, bool bIncludeDot=false)
 Gets the extension for this filename. 更多...
 
static TArray< FString > GetExtensionDirs (const FString &BaseDir, const FString &SubDir=FString())
 Returns platform and restricted extensions that are present and valid (for platforms, it uses FDataDrivePlatformInfo to determine valid platforms, it doesn't just use what's present) 更多...
 
static const TArray< FString > & GetGameLocalizationPaths ()
 Returns a list of game-specific localization paths
 
static FString GetInvalidFileSystemChars ()
 Returns a string containing all invalid characters as dictated by the operating system
 
static FString GetPlatformLocalizationFolderName ()
 Get the name of the platform-specific localization sub-folder
 
static FString GetProjectFilePath ()
 Gets the path to the project file. 更多...
 
static const TArray< FString > & GetPropertyNameLocalizationPaths ()
 Returns a list of property name localization paths
 
static const FString & GetRelativePathToRoot ()
 Gets the relative path to get from BaseDir to RootDirectory

 
static const TArray< FString > & GetRestrictedFolderNames ()
 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.
 
static const TArray< FString > & GetToolTipLocalizationPaths ()
 Returns a list of tool tip localization paths
 
static bool IsDrive (const FString &InPath)
 Returns true if this path represents a root drive or volume
 
static bool IsProjectFilePathSet ()
 Checks whether the path to the project file, if any, is set. 更多...
 
static bool IsRelative (const FString &InPath)
 Returns true if this path is relative to another path
 
static bool IsRestrictedPath (const FString &InPath)
 Determines if supplied path uses a restricted/internal subdirectory. 更多...
 
static bool IsSamePath (const FString &PathA, const FString &PathB)
 Checks if two paths are the same. 更多...
 
static bool IsUnderDirectory (const FString &InPath, const FString &InDirectory)
 Determines if a path is under a given directory
 
static FString LaunchDir ()
 Returns the directory the application was launched from (useful for commandline utilities)
 
static bool MakePathRelativeTo (FString &InPath, const TCHAR *InRelativeTo)
 Assuming both paths (or filenames) are relative to the same base dir, modifies InPath to be relative to InRelativeTo 更多...
 
static void MakePlatformFilename (FString &InPath)
 Takes an "Unreal" pathname and converts it to a platform filename.
 
static FString MakeValidFileName (const FString &InString, const TCHAR InReplacementChar=0)
 Returns a string that is safe to use as a filename because all items in GetInvalidFileSystemChars() are removed
 
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
 
static void NormalizeFilename (FString &InPath)
 Convert all / and \ to TEXT("/")
 
static FString ProfilingDir ()
 Returns the directory the engine uses to output profiling files. 更多...
 
static FString ProjectConfigDir ()
 Returns the directory the root configuration files are located. 更多...
 
static FString ProjectContentDir ()
 Returns the content directory of the current game by looking at FApp::GetProjectName(). 更多...
 
static FString ProjectDir ()
 Returns the base directory of the current project by looking at FApp::GetProjectName(). 更多...
 
static FString ProjectIntermediateDir ()
 Returns the intermediate directory of the current game by looking at FApp::GetProjectName(). 更多...
 
static FString ProjectLogDir ()
 Returns the directory the engine uses to output logs. 更多...
 
static FString ProjectModsDir ()
 Returns the mods directory of the current project by looking at FApp::GetProjectName(). 更多...
 
static FString ProjectPlatformExtensionsDir ()
 Returns the directory where the project's platform extensions reside 更多...
 
static FString ProjectPluginsDir ()
 Returns the plugins directory of the current game by looking at FApp::GetProjectName(). 更多...
 
static const FString & ProjectSavedDir ()
 Returns the saved directory of the current game by looking at FApp::GetProjectName(). 更多...
 
static FString ProjectUserDir ()
 Returns the root directory for user-specific game files. 更多...
 
static void RemoveDuplicateSlashes (FString &InPath)
 Removes duplicate slashes in paths. 更多...
 
static FString RootDir ()
 Returns the root directory of the engine directory tree 更多...
 
static FString SandboxesDir ()
 Returns the directory the engine stores sandbox output 更多...
 
static FString ScreenShotDir ()
 Returns the directory the engine uses to output screenshot files. 更多...
 
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)
 
static void SetProjectFilePath (const FString &NewGameProjectFilePath)
 Sets the path to the project file. 更多...
 
static bool ShouldSaveToUserDir ()
 Should the "saved" directory structures be rooted in the user dir or relative to the "engine/game"
 
static FString SourceConfigDir ()
 Returns the directory the engine uses to look for the source leaf ini files. 更多...
 
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). 更多...
 
static void TearDown ()
 Frees any memory retained by FPaths.
 
static bool ValidatePath (const FString &InPath, FText *OutReason=nullptr)
 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 更多...
 
static FString VideoCaptureDir ()
 Returns the directory the engine uses to output user requested video capture files. 更多...
 

详细描述

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

成员函数说明

◆ AutomationReportsDir()

static FString FPaths::AutomationReportsDir ( )
static

Returns the directory for results of automation tests.

May be deleted every run.

◆ BugItDir()

static FString FPaths::BugItDir ( )
static

Returns the directory the engine uses to output BugIt files.

返回
screenshot directory

◆ CollapseRelativeDirectories()

static bool FPaths::CollapseRelativeDirectories ( FString &  InPath)
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

◆ ConvertFromSandboxPath()

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

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

参数
InSandboxNameThe name of the sandbox.

◆ ConvertToSandboxPath()

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

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

参数
InSandboxNameThe name of the sandbox.

◆ CreateStandardFilename()

static 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()

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

Creates a temporary filename with the specified prefix.

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

◆ EngineConfigDir()

static FString FPaths::EngineConfigDir ( )
static

Returns the directory the root configuration files are located.

返回
root config directory

◆ EngineContentDir()

static FString FPaths::EngineContentDir ( )
static

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

返回
engine content directory

◆ EngineDefaultLayoutDir()

static FString FPaths::EngineDefaultLayoutDir ( )
static

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

返回
Directory for default Editor UI Layout files.

◆ EngineDir()

static 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.

返回
engine directory

◆ EngineEditorSettingsDir()

static FString FPaths::EngineEditorSettingsDir ( )
static

Returns the Editor Settings directory of the engine

返回
Editor Settings directory.

◆ EngineIntermediateDir()

static FString FPaths::EngineIntermediateDir ( )
static

Returns the intermediate directory of the engine

返回
content directory

◆ EnginePlatformExtensionsDir()

static FString FPaths::EnginePlatformExtensionsDir ( )
static

Returns the directory where engine platform extensions reside

返回
engine platform extensions directory

◆ EnginePluginsDir()

static FString FPaths::EnginePluginsDir ( )
static

Returns the plugins directory of the engine

返回
Plugins directory.

◆ EngineProjectLayoutDir()

static FString FPaths::EngineProjectLayoutDir ( )
static

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

返回
Directory for project Editor UI Layout files.

◆ EngineSavedDir()

static FString FPaths::EngineSavedDir ( )
static

Returns the saved directory of the engine

返回
Saved directory.

◆ EngineUserDir()

static FString FPaths::EngineUserDir ( )
static

Returns the root directory for user-specific engine files.

Always writable.

返回
root user directory

◆ EngineUserLayoutDir()

static FString FPaths::EngineUserLayoutDir ( )
static

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

返回
Directory for user-generated Editor UI Layout files.

◆ EngineVersionAgnosticUserDir()

static FString FPaths::EngineVersionAgnosticUserDir ( )
static

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

Always writable.

返回
root user directory

◆ EnterpriseDir()

static FString FPaths::EnterpriseDir ( )
static

Returns the base directory enterprise directory.

返回
enterprise directory

◆ EnterpriseFeaturePackDir()

static FString FPaths::EnterpriseFeaturePackDir ( )
static

Returns the enterprise FeaturePack directory

返回
FeaturePack directory.

◆ EnterprisePluginsDir()

static FString FPaths::EnterprisePluginsDir ( )
static

Returns the enterprise plugins directory

返回
Plugins directory.

◆ GameAgnosticSavedDir()

static FString FPaths::GameAgnosticSavedDir ( )
static

Returns the saved directory that is not game specific.

This is usually the same as EngineSavedDir().

返回
saved directory

◆ GeneratedConfigDir()

static FString FPaths::GeneratedConfigDir ( )
static

Returns the directory the engine saves generated config files.

返回
config directory

◆ GetExtension()

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

Gets the extension for this filename.

参数
bIncludeDotif true, includes the leading dot in the result
返回
the extension of this filename, or an empty string if the filename doesn't have an extension.

◆ GetExtensionDirs()

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

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

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

◆ GetProjectFilePath()

static FString FPaths::GetProjectFilePath ( )
static

Gets the path to the project file.

返回
Project file path.

◆ IsProjectFilePathSet()

static bool FPaths::IsProjectFilePathSet ( )
static

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

返回
true if the path is set, false otherwise.

◆ IsRestrictedPath()

static 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()

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

Checks if two paths are the same.

参数
PathAFirst path to check.
PathBSecond path to check.
返回
True if both paths are the same. False otherwise.

◆ MakePathRelativeTo()

static 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

参数
InPathPath to change to be relative to InRelativeTo
InRelativeToPath to use as the new relative base
返回
true if InPath was changed to be relative

◆ ProfilingDir()

static FString FPaths::ProfilingDir ( )
static

Returns the directory the engine uses to output profiling files.

返回
log directory

◆ ProjectConfigDir()

static FString FPaths::ProjectConfigDir ( )
static

Returns the directory the root configuration files are located.

返回
root config directory

◆ ProjectContentDir()

static FString FPaths::ProjectContentDir ( )
static

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

返回
content directory

◆ ProjectDir()

static 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.

返回
base directory

◆ ProjectIntermediateDir()

static FString FPaths::ProjectIntermediateDir ( )
static

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

返回
intermediate directory

◆ ProjectLogDir()

static 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.

返回
log directory

◆ ProjectModsDir()

static FString FPaths::ProjectModsDir ( )
static

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

返回
mods directory

◆ ProjectPlatformExtensionsDir()

static FString FPaths::ProjectPlatformExtensionsDir ( )
static

Returns the directory where the project's platform extensions reside

返回
project platform extensions directory

◆ ProjectPluginsDir()

static FString FPaths::ProjectPluginsDir ( )
static

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

返回
plugins directory

◆ ProjectSavedDir()

static const FString & FPaths::ProjectSavedDir ( )
static

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

返回
saved directory

◆ ProjectUserDir()

static FString FPaths::ProjectUserDir ( )
static

Returns the root directory for user-specific game files.

返回
game user directory

◆ RemoveDuplicateSlashes()

static 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()

static FString FPaths::RootDir ( )
static

Returns the root directory of the engine directory tree

返回
Root directory.

◆ SandboxesDir()

static FString FPaths::SandboxesDir ( )
static

Returns the directory the engine stores sandbox output

返回
sandbox directory

◆ ScreenShotDir()

static FString FPaths::ScreenShotDir ( )
static

Returns the directory the engine uses to output screenshot files.

返回
screenshot directory

◆ SetProjectFilePath()

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

Sets the path to the project file.

参数
NewGameProjectFilePath- The project file path to set.

◆ SourceConfigDir()

static 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.

返回
source config directory

◆ Split()

static 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).

参数
Path[out] receives the value of the path portion of the input string
Filename[out] receives the value of the filename portion of the input string
Extension[out] receives the value of the extension portion of the input string

◆ ValidatePath()

static 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

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

◆ VideoCaptureDir()

static FString FPaths::VideoCaptureDir ( )
static

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

返回
Video capture directory

该类的文档由以下文件生成: