Navigation
API > API/Runtime > API/Runtime/CoreUObject
Internal class only; not used by blueprints. This class is only used in the CoreUObject linker layer and (optionally) as an argument to LoadPackage
Specifies a path to the contents of a UPackage that can be loaded from disk (or other persistent storage) through IPackageResourceManager Package contents are requested from the PackageResourceManager by FPackagePath and EPackageSegment FPackagePaths are stored internally in one of a few options necessary to maintain their construction arguments without losing data const FPackagePaths can still be mutated to be stored as another internal type const FPackagePaths can still be mutated to indicate which header extension was found for them on disk (It is illegal to have multiple packages on disk with the same PackagePath but different header extensions)
| Name | FPackagePath |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/Misc/PackagePath.h |
| Include Path | #include "Misc/PackagePath.h" |
Syntax
class FPackagePath
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
constexpr FPackagePath () |
Construct an empty PackagePath | Misc/PackagePath.h | |
FPackagePath
(
const FPackagePath& Other |
Misc/PackagePath.h | ||
FPackagePath
(
FPackagePath&& Other |
Misc/PackagePath.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ExtensionLen | uint16 | Misc/PackagePath.h | ||
| FilePathRootLen | uint16 | Misc/PackagePath.h | ||
| HeaderExtension | EPackageExtension | Misc/PackagePath.h | ||
| IdType | EPackageIdType | Misc/PackagePath.h | ||
| PackageNameRootLen | uint16 | Misc/PackagePath.h | ||
| PathDataLen | uint16 | Misc/PackagePath.h | ||
| StringData | TUniquePtr< TCHAR[]> | Combined storage for (EPackageIDType-specific path+filename storage) followed by (possibly empty) PackageNameRoot followed by (possibly empty) FilePathRoot followed by (possibly empty) Extension Total length is (PathDataLen + PackageNameRootLen + FilePathRootLen + ExtensionLen) | Misc/PackagePath.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AppendLocalBaseFilenameWithPath
(
FStringBuilderBase& Builder |
Append the Local (path,basename) of this PackagePath if known or available, or take no action if not | Misc/PackagePath.h | |
void AppendLocalFullPath
(
FStringBuilderBase& Builder, |
Version of AppendLocalFullPath that takes a PackageSegment, otherwise same behavior as parameterless version | Misc/PackagePath.h | |
void AppendLocalFullPath
(
FStringBuilderBase& Builder |
Append the full relative LocalPath (path,basename,extension) | Misc/PackagePath.h | |
void AppendPackageName
(
FStringBuilderBase& Builder |
Append the PackageName indicated by this PackagePath if known or available, or take no action if not | Misc/PackagePath.h | |
void Empty() |
Free this PackagePath's data and set it to an empty PackagePath | Misc/PackagePath.h | |
FStringView GetCustomExtension() |
Return the custom string if this PackagePath is using HeaderExtension=EPackageExtension::Custom, otherwise return an empty string | Misc/PackagePath.h | |
| Returns a descriptor of this PackagePath, usable for an identifier in warning and log messages. | Misc/PackagePath.h | ||
FString GetDebugName
(
EPackageSegment PackageSegment |
Version of GetDebugName that takes a PackageSegment, otherwise same behavior as parameterless version For EPackageSegment::Header, HeaderExtension is not indicated. | Misc/PackagePath.h | |
| Returns GetDebugName converted to FText | Misc/PackagePath.h | ||
FText GetDebugNameText
(
EPackageSegment PackageSegment |
Version of GetDebugNameText that takes a PackageSegment, otherwise same behavior as parameterless version | Misc/PackagePath.h | |
| Returns a descriptor of this PackagePath for the given segment, with extension. | Misc/PackagePath.h | ||
FString GetDebugNameWithExtension
(
EPackageSegment PackageSegment |
Version of GetDebugNameWithExtension that takes a PackageSegment, otherwise same behavior as parameterless version | Misc/PackagePath.h | |
EPackageExtension GetExtension
(
EPackageSegment PackageSegment, |
Report the extension this PackagePath uses for the given segment | Misc/PackagePath.h | |
FStringView GetExtensionString
(
EPackageSegment PackageSegment |
Report the extension string this PackagePath uses for the given segment. | Misc/PackagePath.h | |
| Return the HeaderExtension | Misc/PackagePath.h | ||
| Return the Local (path,basename) of this PackagePath if known or available, or empty string if not | Misc/PackagePath.h | ||
FString GetLocalFullPath
(
EPackageSegment PackageSegment |
Version of GetLocalFullPath that takes a PackageSegment, otherwise same behavior as parameterless version | Misc/PackagePath.h | |
| Return the full LocalPath (path,basename,extension) | Misc/PackagePath.h | ||
| Return as an FName the PackageName indicated by this PackagePath if known or available, or NAME_None if not | Misc/PackagePath.h | ||
| Return the PackageName indicated by this PackagePath if known or available, or empty string if not | Misc/PackagePath.h | ||
| Returns the PackageName if available, otherwise the LocalPath | Misc/PackagePath.h | ||
TConstArrayView< EPackageExtension > GetPossibleExtensions
(
EPackageSegment PackageSegment |
Report the EPackageExtensions this PackagePath should look for on disk | Misc/PackagePath.h | |
bool HasLocalPath () |
Return true if and only if GetLocalBaseFilenameWithPath returns non-empty | Misc/PackagePath.h | |
bool HasPackageName () |
Return true if and only if GetPackageName returns non-empty | Misc/PackagePath.h | |
bool IsEmpty () |
Return whether this is a PackagePath with no path information and can never identify a package on disk | Misc/PackagePath.h | |
bool IsMountedPath () |
Return whether a mount point has been found for this PackagePath | Misc/PackagePath.h | |
void SetHeaderExtension
(
EPackageExtension Extension, |
Set the HeaderExtension to use, including a custom string if Extension is EPackageExtension::Custom | Misc/PackagePath.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FPackagePath FromLocalPath
(
FStringView InFilename |
Construct a PackagePath from a LocalPath string | Misc/PackagePath.h | |
static FPackagePath FromLocalPath
(
FStringView InFilename, |
Version of FromLocalPath that also returns the PackageSegment matching the Filename's extension | Misc/PackagePath.h | |
static FPackagePath FromMountedComponents
(
FStringView PackageNameRoot, |
Construct a PackagePath from the components of a MountedPath | Misc/PackagePath.h | |
static FPackagePath FromPackageNameChecked
(
FName InPackageName |
Misc/PackagePath.h | ||
static FPackagePath FromPackageNameChecked
(
const TCHAR* InPackageName |
Misc/PackagePath.h | ||
static FPackagePath FromPackageNameChecked
(
FStringView InPackageName |
Construct a PackagePath from a LongPackageName StringView, FName, or TCHAR* | Misc/PackagePath.h | |
static FPackagePath FromPackageNameUnchecked
(
FName InPackageName |
Construct a PackagePath from a known valid LongPackageName FName | Misc/PackagePath.h | |
static const TCHAR * GetExternalActorsFolderName() |
Get the folder name from which all external actors paths are created | Misc/PackagePath.h | |
static const TCHAR * GetExternalObjectsFolderName() |
Get the folder name from which all external objects paths are created | Misc/PackagePath.h | |
static const TCHAR * GetOptionalSegmentExtensionModifier() |
Get the string identifying optional segments | Misc/PackagePath.h | |
static EPackageExtension ParseExtension
(
FStringView Filename, |
Parse the extension from a filepath and convert it to an EPackageExtension. | Misc/PackagePath.h | |
static bool TryFromMountedName
(
FStringView InPackageNameOrHeaderFilePath, |
Construct a PackagePath from a LocalPath or PackageName string, assuming the given LocalPath or PackageName is in a directory that is mounted (aka registered with FPackageName::MountPointExists) | Misc/PackagePath.h | |
static bool TryFromPackageName
(
FName InPackageName, |
Misc/PackagePath.h | ||
static bool TryFromPackageName
(
FStringView InPackageName, |
Attempt to construct a PackagePath from a LongPackageName StringView, FName, or TCHAR* | Misc/PackagePath.h | |
static bool TryFromPackageName
(
const TCHAR* InPackageName, |
Misc/PackagePath.h | ||
static bool TryMatchCase
(
const FPackagePath& SourcePackagePath, |
Set the capitalization of a PackagePath to match the given string | Misc/PackagePath.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FPackagePath& Other |
Misc/PackagePath.h | ||
FPackagePath & operator=
(
FPackagePath&& Other |
Misc/PackagePath.h | ||
FPackagePath & operator=
(
const FPackagePath& Other |
Misc/PackagePath.h | ||
bool operator==
(
const FPackagePath& Other |
Comparsion operators. | Misc/PackagePath.h |