G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
Paths Namespace Reference

Functions

Utilities|Paths
FString GetProjectFilePath ()
 Gets the path to the project file.
FString AutomationLogDir ()
 Returns the directory for automation log files.
FString AutomationTransientDir ()
 Returns the directory for automation save files that are meant to be deleted every run.
FString BugItDir ()
 Returns the directory the engine uses to output BugIt files.
FString ChangeExtension (FString InPath, FString InNewExtension)
 Changes the extension of the given filename (does nothing if the file has no extension).
FString CloudDir ()
 Returns the directory for local files used in cloud emulation or support.
bool CollapseRelativeDirectories (FString InPath, FString &OutPath)
 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.
FString Combine (TArray< FString > InPaths)
 Combine two or more Paths into one single Path.
FString ConvertFromSandboxPath (FString InPath, FString InSandboxName)
 Converts a sandbox (in Saved/Sandboxes) path to a normal path.
FString ConvertRelativePathToFull (FString InPath, FString InBasePath="")
 Converts a relative path name to a fully qualified name relative to the specified BasePath. BasePath will be the process BaseDir() if not BasePath is given.
FString ConvertToSandboxPath (FString InPath, FString InSandboxName)
 Converts a normal path to a sandbox path (in Saved/Sandboxes).
FString CreateTempFilename (FString Path, FString Prefix="", FString Extension=".tmp")
 Creates a temporary filename with the specified prefix.
FString DiffDir ()
 Returns the directory for temp files used for diffing.
bool DirectoryExists (FString InPath)
 Returns true if this directory was found, false otherwise.
FString EngineConfigDir ()
 Returns the directory the root configuration files are located.
FString EngineContentDir ()
 Returns the content directory of the "core" engine that can be shared across several games or across games & mods.
FString EngineDir ()
 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.
FString EngineIntermediateDir ()
 Returns the intermediate directory of the engine.
FString EnginePluginsDir ()
 Returns the plugins directory of the engine.
FString EngineSavedDir ()
 Returns the saved directory of the engine.
FString EngineSourceDir ()
 Returns the directory where engine source code files are kept.
FString EngineUserDir ()
 Returns the root directory for user-specific engine files. Always writable.
FString EngineVersionAgnosticUserDir ()
 Returns the root directory for user-specific engine files which can be shared between versions. Always writable.
FString EnterpriseDir ()
 Returns the base directory enterprise directory.
FString EnterpriseFeaturePackDir ()
 Returns the enterprise FeaturePack directory.
FString EnterprisePluginsDir ()
 Returns the enterprise plugins directory.
FString FeaturePackDir ()
 Returns the directory where feature packs are kept.
bool FileExists (FString InPath)
 Returns true if this file was found, false otherwise.
FString GameAgnosticSavedDir ()
 Returns the saved directory that is not game specific. This is usually the same as EngineSavedDir().
FString GameDevelopersDir ()
 Returns the directory that contains subfolders for developer-specific content.
FString GameSourceDir ()
 Returns the directory where game source code files are kept.
FString GameUserDeveloperDir ()
 Returns the directory that contains developer-specific content for the current user.
FString GeneratedConfigDir ()
 Returns the directory the engine saves generated config files.
FString GetBaseFilename (FString InPath, bool bRemovePath=true)
 Returns the same thing as GetCleanFilename, but without the extension.
FString GetCleanFilename (FString InPath)
 Returns the filename (with extension), minus any path information.
const TArray< FString > & GetEditorLocalizationPaths ()
 Returns a list of editor-specific localization paths.
const TArray< FString > & GetEngineLocalizationPaths ()
 Returns a list of engine-specific localization paths.
FString GetExtension (FString InPath, bool bIncludeDot=false)
 Gets the extension for this filename.
const TArray< FString > & GetGameLocalizationPaths ()
 Returns a list of game-specific localization paths.
FString GetInvalidFileSystemChars ()
 Returns a string containing all invalid characters as dictated by the operating system.
FString GetPath (FString InPath)
 Returns the path in front of the filename.
FString AutomationDir ()
 Returns the directory for automation save files.
const TArray< FString > & GetPropertyNameLocalizationPaths ()
 Returns a list of property name localization paths.
const FString & GetRelativePathToRoot ()
 Gets the relative path to get from BaseDir to RootDirectory.
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.
const TArray< FString > & GetToolTipLocalizationPaths ()
 Returns a list of tool tip localization paths.
bool HasProjectPersistentDownloadDir ()
 Returns true if a writable directory for downloaded data that persists across play sessions is available.
bool IsDrive (FString InPath)
 Returns true if this path represents a root drive or volume.
bool IsProjectFilePathSet ()
 Checks whether the path to the project file, if any, is set.
bool IsRelative (FString InPath)
 Returns true if this path is relative to another path.
bool IsRestrictedPath (FString InPath)
 Determines if supplied path uses a restricted/internal subdirectory. Note that slashes are normalized and character case is ignored for the comparison.
bool IsSamePath (FString PathA, FString PathB)
 Checks if two paths are the same.
FString LaunchDir ()
 Returns the directory the application was launched from (useful for commandline utilities).
bool MakePathRelativeTo (FString InPath, FString InRelativeTo, FString &OutPath)
 Assuming both paths (or filenames) are relative to the same base dir, converts InPath to be relative to InRelativeTo.
void MakePlatformFilename (FString InPath, FString &OutPath)
 Takes an "Unreal" pathname and converts it to a platform filename.
void MakeStandardFilename (FString InPath, FString &OutPath)
 Make fully standard "Unreal" pathname:
FString MakeValidFileName (FString InString, FString InReplacementChar="")
 Returns a string that is safe to use as a filename because all items in GetInvalidFileSystemChars() are removed.
void NormalizeDirectoryName (FString InPath, FString &OutPath)
 Normalize all / and \ to TEXT("/") and remove any trailing TEXT("/") if the character before that is not a TEXT("/") or a colon.
void NormalizeFilename (FString InPath, FString &OutPath)
 Convert all / and \ to TEXT("/").
FString ProfilingDir ()
 Returns the directory the engine uses to output profiling files.
FString ProjectConfigDir ()
 Returns the directory the root configuration files are located.
FString ProjectContentDir ()
 Returns the content directory of the current game by looking at FApp::GetProjectName().
FString ProjectDir ()
 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.
FString ProjectIntermediateDir ()
 Returns the intermediate directory of the current game by looking at FApp::GetProjectName().
FString ProjectLogDir ()
 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.
FString ProjectModsDir ()
 Returns the mods directory of the current project by looking at FApp::GetProjectName().
FString ProjectPersistentDownloadDir ()
 Returns the writable directory for downloaded data that persists across play sessions.
FString ProjectPluginsDir ()
 Returns the plugins directory of the current game by looking at FApp::GetProjectName().
FString ProjectSavedDir ()
 Returns the saved directory of the current game by looking at FApp::GetProjectName().
FString ProjectUserDir ()
 Returns the root directory for user-specific game files.
void RemoveDuplicateSlashes (FString InPath, FString &OutPath)
 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.
FString RootDir ()
 Returns the root directory of the engine directory tree.
FString SandboxesDir ()
 Returns the directory the engine stores sandbox output.
FString ScreenShotDir ()
 Returns the directory the engine uses to output screenshot files.
FString SetExtension (FString InPath, FString InNewExtension)
 Sets the extension of the given filename (like ChangeExtension, but also applies the extension if the file doesn't have one).
void SetProjectFilePath (FString NewGameProjectFilePath)
 Sets the path to the project file.
FString ShaderWorkingDir ()
 Returns the Shader Working Directory.
bool ShouldSaveToUserDir ()
 Should the "saved" directory structures be rooted in the user dir or relative to the "engine/game".
FString SourceConfigDir ()
 Returns the directory the engine uses to look for the source leaf ini files. This can't be an .ini variable for obvious reasons.
void Split (FString InPath, FString &PathPart, FString &FilenamePart, FString &ExtensionPart)
 Parses a fully qualified or relative filename into its components (filename, path, extension).
void ValidatePath (FString InPath, bool &bDidSucceed, 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.
FString VideoCaptureDir ()
 Returns the directory the engine uses to output user requested video capture files.

Variables

Variables
FString ProjectFilePath
const TArray< FString > EngineLocalizationPaths
const TArray< FString > GameLocalizationPaths
const FString InvalidFileSystemChars
const TArray< FString > EditorLocalizationPaths
const TArray< FString > PropertyNameLocalizationPaths
const FString RelativePathToRoot
const TArray< FString > RestrictedFolderNames
const TArray< FString > ToolTipLocalizationPaths

Function Documentation

◆ AutomationDir()

FString AutomationDir ( )

Returns the directory for automation save files.

◆ AutomationLogDir()

FString AutomationLogDir ( )

Returns the directory for automation log files.

◆ AutomationTransientDir()

FString AutomationTransientDir ( )

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

◆ BugItDir()

FString BugItDir ( )

Returns the directory the engine uses to output BugIt files.

Returns
screenshot directory

◆ ChangeExtension()

FString ChangeExtension ( FString InPath,
FString InNewExtension )

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

◆ CloudDir()

FString CloudDir ( )

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

◆ CollapseRelativeDirectories()

bool CollapseRelativeDirectories ( FString InPath,
FString & OutPath )

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.

◆ Combine()

FString Combine ( TArray< FString > InPaths)

Combine two or more Paths into one single Path.

◆ ConvertFromSandboxPath()

FString ConvertFromSandboxPath ( FString InPath,
FString InSandboxName )

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

Parameters
InSandboxNameThe name of the sandbox.

◆ ConvertRelativePathToFull()

FString ConvertRelativePathToFull ( FString InPath,
FString InBasePath = "" )

Converts a relative path name to a fully qualified name relative to the specified BasePath. BasePath will be the process BaseDir() if not BasePath is given.

◆ ConvertToSandboxPath()

FString ConvertToSandboxPath ( FString InPath,
FString InSandboxName )

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

Parameters
InSandboxNameThe name of the sandbox.

◆ CreateTempFilename()

FString CreateTempFilename ( FString Path,
FString Prefix = "",
FString Extension = ".tmp" )

Creates a temporary filename with the specified prefix.

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

◆ DiffDir()

FString DiffDir ( )

Returns the directory for temp files used for diffing.

◆ DirectoryExists()

bool DirectoryExists ( FString InPath)

Returns true if this directory was found, false otherwise.

◆ EngineConfigDir()

FString EngineConfigDir ( )

Returns the directory the root configuration files are located.

Returns
root config directory

◆ EngineContentDir()

FString EngineContentDir ( )

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

Returns
engine content directory

◆ EngineDir()

FString EngineDir ( )

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

◆ EngineIntermediateDir()

FString EngineIntermediateDir ( )

Returns the intermediate directory of the engine.

Returns
content directory

◆ EnginePluginsDir()

FString EnginePluginsDir ( )

Returns the plugins directory of the engine.

Returns
Plugins directory.

◆ EngineSavedDir()

FString EngineSavedDir ( )

Returns the saved directory of the engine.

Returns
Saved directory.

◆ EngineSourceDir()

FString EngineSourceDir ( )

Returns the directory where engine source code files are kept.

◆ EngineUserDir()

FString EngineUserDir ( )

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

Returns
root user directory

◆ EngineVersionAgnosticUserDir()

FString EngineVersionAgnosticUserDir ( )

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

Returns
root user directory

◆ EnterpriseDir()

FString EnterpriseDir ( )

Returns the base directory enterprise directory.

Returns
enterprise directory

◆ EnterpriseFeaturePackDir()

FString EnterpriseFeaturePackDir ( )

Returns the enterprise FeaturePack directory.

Returns
FeaturePack directory.

◆ EnterprisePluginsDir()

FString EnterprisePluginsDir ( )

Returns the enterprise plugins directory.

Returns
Plugins directory.

◆ FeaturePackDir()

FString FeaturePackDir ( )

Returns the directory where feature packs are kept.

◆ FileExists()

bool FileExists ( FString InPath)

Returns true if this file was found, false otherwise.

◆ GameAgnosticSavedDir()

FString GameAgnosticSavedDir ( )

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

Returns
saved directory

◆ GameDevelopersDir()

FString GameDevelopersDir ( )

Returns the directory that contains subfolders for developer-specific content.

◆ GameSourceDir()

FString GameSourceDir ( )

Returns the directory where game source code files are kept.

◆ GameUserDeveloperDir()

FString GameUserDeveloperDir ( )

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

◆ GeneratedConfigDir()

FString GeneratedConfigDir ( )

Returns the directory the engine saves generated config files.

Returns
config directory

◆ GetBaseFilename()

FString GetBaseFilename ( FString InPath,
bool bRemovePath = true )

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

◆ GetCleanFilename()

FString GetCleanFilename ( FString InPath)

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

◆ GetEditorLocalizationPaths()

const TArray< FString > & GetEditorLocalizationPaths ( )

Returns a list of editor-specific localization paths.

◆ GetEngineLocalizationPaths()

const TArray< FString > & GetEngineLocalizationPaths ( )

Returns a list of engine-specific localization paths.

◆ GetExtension()

FString GetExtension ( FString InPath,
bool bIncludeDot = false )

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.

◆ GetGameLocalizationPaths()

const TArray< FString > & GetGameLocalizationPaths ( )

Returns a list of game-specific localization paths.

◆ GetInvalidFileSystemChars()

FString GetInvalidFileSystemChars ( )

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

◆ GetPath()

FString GetPath ( FString InPath)

Returns the path in front of the filename.

◆ GetProjectFilePath()

FString GetProjectFilePath ( )

Gets the path to the project file.

Returns
Project file path.

◆ GetPropertyNameLocalizationPaths()

const TArray< FString > & GetPropertyNameLocalizationPaths ( )

Returns a list of property name localization paths.

◆ GetRelativePathToRoot()

const FString & GetRelativePathToRoot ( )

Gets the relative path to get from BaseDir to RootDirectory.

◆ GetRestrictedFolderNames()

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.

◆ GetToolTipLocalizationPaths()

const TArray< FString > & GetToolTipLocalizationPaths ( )

Returns a list of tool tip localization paths.

◆ HasProjectPersistentDownloadDir()

bool HasProjectPersistentDownloadDir ( )

Returns true if a writable directory for downloaded data that persists across play sessions is available.

◆ IsDrive()

bool IsDrive ( FString InPath)

Returns true if this path represents a root drive or volume.

◆ IsProjectFilePathSet()

bool IsProjectFilePathSet ( )

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

Returns
true if the path is set, false otherwise.

◆ IsRelative()

bool IsRelative ( FString InPath)

Returns true if this path is relative to another path.

◆ IsRestrictedPath()

bool IsRestrictedPath ( FString InPath)

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

◆ IsSamePath()

bool IsSamePath ( FString PathA,
FString PathB )

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.

◆ LaunchDir()

FString LaunchDir ( )

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

◆ MakePathRelativeTo()

bool MakePathRelativeTo ( FString InPath,
FString InRelativeTo,
FString & OutPath )

Assuming both paths (or filenames) are relative to the same base dir, converts 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 OutPath was changed to be relative

◆ MakePlatformFilename()

void MakePlatformFilename ( FString InPath,
FString & OutPath )

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

◆ MakeStandardFilename()

void MakeStandardFilename ( FString InPath,
FString & OutPath )

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

◆ MakeValidFileName()

FString MakeValidFileName ( FString InString,
FString InReplacementChar = "" )

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

Optionally specify the character to replace invalid characters with

◆ NormalizeDirectoryName()

void NormalizeDirectoryName ( FString InPath,
FString & OutPath )

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

◆ NormalizeFilename()

void NormalizeFilename ( FString InPath,
FString & OutPath )

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

◆ ProfilingDir()

FString ProfilingDir ( )

Returns the directory the engine uses to output profiling files.

Returns
log directory

◆ ProjectConfigDir()

FString ProjectConfigDir ( )

Returns the directory the root configuration files are located.

Returns
root config directory

◆ ProjectContentDir()

FString ProjectContentDir ( )

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

Returns
content directory

◆ ProjectDir()

FString ProjectDir ( )

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

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

Returns
intermediate directory

◆ ProjectLogDir()

FString ProjectLogDir ( )

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

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

Returns
mods directory

◆ ProjectPersistentDownloadDir()

FString ProjectPersistentDownloadDir ( )

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

◆ ProjectPluginsDir()

FString ProjectPluginsDir ( )

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

Returns
plugins directory

◆ ProjectSavedDir()

FString ProjectSavedDir ( )

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

Returns
saved directory

◆ ProjectUserDir()

FString ProjectUserDir ( )

Returns the root directory for user-specific game files.

Returns
game user directory

◆ RemoveDuplicateSlashes()

void RemoveDuplicateSlashes ( FString InPath,
FString & OutPath )

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

Returns the root directory of the engine directory tree.

Returns
Root directory.

◆ SandboxesDir()

FString SandboxesDir ( )

Returns the directory the engine stores sandbox output.

Returns
sandbox directory

◆ ScreenShotDir()

FString ScreenShotDir ( )

Returns the directory the engine uses to output screenshot files.

Returns
screenshot directory

◆ SetExtension()

FString SetExtension ( FString InPath,
FString InNewExtension )

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

◆ SetProjectFilePath()

void SetProjectFilePath ( FString NewGameProjectFilePath)

Sets the path to the project file.

Parameters
NewGameProjectFilePathThe project file path to set.

◆ ShaderWorkingDir()

FString ShaderWorkingDir ( )

Returns the Shader Working Directory.

Returns
shader working directory

◆ ShouldSaveToUserDir()

bool ShouldSaveToUserDir ( )

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

◆ SourceConfigDir()

FString SourceConfigDir ( )

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 Split ( FString InPath,
FString & PathPart,
FString & FilenamePart,
FString & ExtensionPart )

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

◆ ValidatePath()

void ValidatePath ( FString InPath,
bool & bDidSucceed,
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.

Parameters
InPathpath to validate
bDidSucceedWhether the path could be validated
OutReasonIf validation fails, this is filled with the failure reason

◆ VideoCaptureDir()

FString VideoCaptureDir ( )

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

Returns
Video capture directory

Variable Documentation

◆ EditorLocalizationPaths

const TArray<FString> EditorLocalizationPaths

◆ EngineLocalizationPaths

const TArray<FString> EngineLocalizationPaths

◆ GameLocalizationPaths

const TArray<FString> GameLocalizationPaths

◆ InvalidFileSystemChars

const FString InvalidFileSystemChars

◆ ProjectFilePath

FString ProjectFilePath

◆ PropertyNameLocalizationPaths

const TArray<FString> PropertyNameLocalizationPaths

◆ RelativePathToRoot

const FString RelativePathToRoot

◆ RestrictedFolderNames

const TArray<FString> RestrictedFolderNames

◆ ToolTipLocalizationPaths

const TArray<FString> ToolTipLocalizationPaths