![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <PackageResourceManager.h>
Inheritance diagram for IPackageResourceManager:Public Types | |
| typedef TFunctionRef< bool(const FPackagePath &PackagePath)> | FPackagePathVisitor |
| typedef TFunctionRef< bool(const FPackagePath &PackagePath, const FFileStatData &StatData)> | FPackagePathStatVisitor |
| typedef TFunctionRef< bool(const FPackagePath &PackagePath, EPackageSegment PackageSegment)> | FPackageSegmentVisitor |
| typedef TFunctionRef< bool(const FPackagePath &PackagePath, EPackageSegment PackageSegment, const FFileStatData &StatData)> | FPackageSegmentStatVisitor |
Provides directory queries and Archive payloads for PackagePaths and their PackageSegments from a repository that might be the local content directories, a database running on the current machine, or a remote database.
| typedef TFunctionRef<bool(const FPackagePath& PackagePath, const FFileStatData& StatData)> IPackageResourceManager::FPackagePathStatVisitor |
Return value specifies whether iteration should continue
| typedef TFunctionRef<bool(const FPackagePath& PackagePath)> IPackageResourceManager::FPackagePathVisitor |
Return value specifies whether iteration should continue
| typedef TFunctionRef<bool(const FPackagePath& PackagePath, EPackageSegment PackageSegment, const FFileStatData& StatData)> IPackageResourceManager::FPackageSegmentStatVisitor |
Return value specifies whether iteration should continue
| typedef TFunctionRef<bool(const FPackagePath& PackagePath, EPackageSegment PackageSegment)> IPackageResourceManager::FPackageSegmentVisitor |
Return value specifies whether iteration should continue
|
virtualdefault |
|
pure virtual |
Report whether a given ExternalResource exists. The same behavior as OpenReadExternalResource != nullptr, but more performant.
| ResourceType | Id for the method used to map the identifier to an archive. |
| Identifier | Id for which resource to return within the ResourceType's domain. |
Implemented in FPackageResourceManagerFile.
|
inline |
|
pure virtual |
DoesPackageExist that takes a PackageSegment
Implemented in FPackageResourceManagerFile.
| bool IPackageResourceManager::DoesPackageExist | ( | const FPackagePath & | PackagePath, |
| FPackagePath * | OutUpdatedPath = nullptr |
||
| ) |
Report whether the package exists
| PackagePath | The package to look for |
| OutUpdatedPath | If non-null and the package is found, PackagePath is copied into this path (noop if OutUpdatedPath == &PackagePath), and if the package exists, the specific extension found is set |
|
inline |
|
pure virtual |
FileSize that takes a PackageSegment
Implemented in FPackageResourceManagerFile.
| int64 IPackageResourceManager::FileSize | ( | const FPackagePath & | PackagePath, |
| FPackagePath * | OutUpdatedPath = nullptr |
||
| ) |
Report the payload size of the package
| PackagePath | The package to look for |
| OutUpdatedPath | If non-null and the package is found, PackagePath is copied into this path (noop if OutUpdatedPath == &PackagePath), and if the package exists, the specific extension found is set |
| void IPackageResourceManager::FindPackagesRecursive | ( | TArray< FPackagePath > & | OutPackages, |
| FStringView | PackageMount, | ||
| FStringView | FileMount, | ||
| FStringView | RootRelPath, | ||
| FStringView | BasenameWildcard | ||
| ) |
Search the given subdirectory of a package mount for all packages with the given package basename in the package repository
| OutPackages | The list of packages found |
| PackageMount | The package name of the mount point to look under |
| FileMount | The local file path of the mount point to look under, must be the local file path that corresponds to PackageMount |
| RootRelPath | A relative path from PackageMount that specifies the subdirectory of the mount point to use as the root of the search |
| BasenameWildcard | The basenamewithoutpath to look for BasenameWildcard can not include path or extension; / and . are invalid characters BasenameWildcard can include *?-type wildcards (FString::MatchesWildcard) |
|
pure virtual |
FindPackagesRecursive that returns PackageSegments
Implemented in FPackageResourceManagerFile.
|
static |
Returns the package resource manager. It is illegal to call Get before calling initialize.
|
static |
|
static |
|
static |
Call during engine startup to choose the appropriate PackageResourceManager for the current configuration and construct it and bind it to be returned from Get
| void IPackageResourceManager::IteratePackagesInLocalOnlyDirectory | ( | FStringView | RootDir, |
| FPackagePathVisitor | Callback | ||
| ) |
Call the callback on all packages in the given local path
PackageResourceManagers that do not support LocalOnly paths will return without calling the Callback
| RootDir | The local path on disk to search |
| Callback | The callback called on each package |
|
pure virtual |
IteratePackagesInLocalOnlyDirectory that takes a FPackageSegmentStatVisitor
Implemented in FPackageResourceManagerFile.
| void IPackageResourceManager::IteratePackagesInPath | ( | FStringView | PackageMount, |
| FStringView | FileMount, | ||
| FStringView | RootRelPath, | ||
| FPackagePathVisitor | Callback | ||
| ) |
Call the callback on all packages in the package repository that are in the given subdirectory of a package mount
| PackageMount | The package name of the mount point's to look under |
| FileMount | The local file path of the mount point to look under, must be the local file path that corresponds to PackageMount |
| RootRelPath | A relative path from PackageMount that specifies the subdirectory of the mount point to use as the root of the search |
| Callback | The callback called on each package |
|
pure virtual |
IteratePackagesInPath that takes a FPackageSegmentVisitor
Implemented in FPackageResourceManagerFile.
| void IPackageResourceManager::IteratePackagesStatInLocalOnlyDirectory | ( | FStringView | RootDir, |
| FPackagePathStatVisitor | Callback | ||
| ) |
Call the callback - with stat data - on all packages in the given local path
PackageResourceManagers that do not support LocalOnly paths will return without calling the Callback
| RootDir | The local path on disk to search |
| Callback | The callback called on each package |
| bOutSupported | If nonnull, receives a true or false value for whether this PackageResourceManager supports searching LocalOnlyDirectories |
|
pure virtual |
IteratePackagesStatInLocalOnlyDirectory that takes a FPackageSegmentStatVisitor
Implemented in FPackageResourceManagerFile.
| void IPackageResourceManager::IteratePackagesStatInPath | ( | FStringView | PackageMount, |
| FStringView | FileMount, | ||
| FStringView | RootRelPath, | ||
| FPackagePathStatVisitor | Callback | ||
| ) |
Call the callback - with stat data - on all packages in the package repository that are in the given subdirectory of a package mount
| PackageMount | The package name of the mount point's to look under |
| FileMount | The local file path of the mount point to look under, must be the local file path that corresponds to PackageMount |
| RootRelPath | A relative path from PackageMount that specifies the subdirectory of the mount point to use as the root of the search |
| Callback | The callback called on each package |
|
pure virtual |
IteratePackagesStatInPath that takes a FPackageSegmentVisitor
Implemented in FPackageResourceManagerFile.
|
pure virtual |
Open an IAsyncReadFileHandle to asynchronously read the bytes of the given ExternalResource. An ExternalResource is in a separate domain from the one out of which this ResourceManager serves PackagePaths.
TODO: This call should not hit the disk/network or block, but it currently does, to find the extension. This call will always return a non-null handle, even if the package does not exist
| ResourceType | Id for the method used to map the identifier to an archive. |
| Identifier | Id for which resource to return within the ResourceType's domain. |
Implemented in FPackageResourceManagerFile.
| FOpenAsyncPackageResult IPackageResourceManager::OpenAsyncReadPackage | ( | const FPackagePath & | PackagePath | ) |
Open an IAsyncReadFileHandle to asynchronously read the bytes of the package
If the PackagePath specifies the extension, this call does not hit the disk/network or block. Otherwise, this call will read from network/disk to find the extension This call will always return a non-null handle, even if the package does not exist
| PackagePath | The package to look for |
|
inline |
|
pure virtual |
OpenAsyncReadPackage that takes a PackageSegment
Implemented in FPackageResourceManagerFile.
|
pure virtual |
Implemented in FPackageResourceManagerFile.
| IMappedFileHandle * IPackageResourceManager::OpenMappedHandleToPackage | ( | const FPackagePath & | PackagePath, |
| FPackagePath * | OutUpdatedPath = nullptr |
||
| ) |
Open an IMappedFileHandle to the package, if the PackageResourceManager supports it
Will return nullptr if the package does not exist or if the PackageResourceManager does not support MappedFilesHandles
| PackagePath | The package to look for |
| OutUpdatedPath | If non-null and the package is found, PackagePath is copied into this path (noop if OutUpdatedPath == &PackagePath), and if the package exists, the specific extension found is set |
|
pure virtual |
Open a seekable binary FArchive to read the bytes of the given External Resource. An ExternalResource is in a separate domain from the one out of which this ResourceManager serves PackagePaths.
| ResourceType | Id for the method used to map the identifier to an archive. |
| Identifier | Id for which resource to return within the ResourceType's domain. |
Implemented in FPackageResourceManagerFile.
|
inline |
|
pure virtual |
OpenReadPackage that takes a PackageSegment
Implemented in FPackageResourceManagerFile.
| FOpenPackageResult IPackageResourceManager::OpenReadPackage | ( | const FPackagePath & | PackagePath, |
| FPackagePath * | OutUpdatedPath = nullptr |
||
| ) |
Open an FArchive to read the bytes of the package
| PackagePath | The package to look for |
| OutUpdatedPath | If non-null and the package is found, PackagePath is copied into this path (noop if OutUpdatedPath == &PackagePath), and if the package exists, the specific extension found is set |
|
static |
Call during engine shutdown to free the PackageResourceManager that was created by Initialize; Get will and return nullptr from this point on
Report whether the PackageResourceManager supports PackagePaths that are unmounted LocalPaths
If unsupported, functions without LocalOnly in their name that take a PackagePath will behave as if the package does not exist in the repository for unmounted LocalPaths If unsupported, functions with LocalOnly in their name will indicate the lack of support when called with unmounted LocalPaths; see each function's description for its precise behavior
Implemented in FPackageResourceManagerFile.
Report whether the PackageResourceManager supports PackagePaths that are unmounted PackageNames
If unsupported, functions without PackageNameOnly in their name that take a PackagePath will behave as if the package does not exist in the repository for unmounted PackageNames If unsupported, functions with PackageNameOnly in their name will indicate the lack of support when called with unmounted PackageNames; see each function's description for its precise behavior
Implemented in FPackageResourceManagerFile.
|
pure virtual |
Find the package in the package repository and set OutNormalizedPath equal to PackagePath, but with capitalization of the PackageName and LocalPath matching the capitalization present in the package repository's internal path string (e.g. the path on disk)
| PackagePath | The package to look for |
| OutNormalizedPath | If non-null and the package is found, PackagePath is copied into this path (noop if OutUpdatedPath == &PackagePath), with matching capitalization and with the specific extension found |
Implemented in FPackageResourceManagerFile.