IPackageResourceManager

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.

Choose your operating system:

Windows

macOS

Linux

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/UObject/PackageResourceManager.h

Include

#include "UObject/PackageResourceManager.h"

Syntax

class IPackageResourceManager

Remarks

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.

Destructors

Name Description

Public function Virtual

~IPackageResourceManager()

Functions

Name Description

Public function

bool

 

DoesExternalResourceExist

(
    EPackageExternalResource ResourceTy...,
    FStringView Identifier
)

Report whether a given ExternalResource exists.

Public function

bool

 

DoesPackageExist

(
    const FPackagePath& PackagePath,
    EPackageSegment PackageSegment,
    FPackagePath* OutUpdatedPath
)

DoesPackageExist that takes a PackageSegment

Public function

bool

 

DoesPackageExist

(
    const FPackagePath& PackagePath,
    FPackagePath* OutUpdatedPath
)

Report whether the package exists

Public function

int64

 

FileSize

(
    const FPackagePath& PackagePath,
    EPackageSegment PackageSegment,
    FPackagePath* OutUpdatedPath
)

FileSize that takes a PackageSegment

Public function

int64

 

FileSize

(
    const FPackagePath& PackagePath,
    FPackagePath* OutUpdatedPath
)

Report the payload size of the package

Public function

void

 

FindPackagesRecursive

(
    TArray< TPair< FPackagePath, EPacka...,
    FStringView PackageMount,
    FStringView FileMount,
    FStringView RootRelPath,
    FStringView BasenameWildcard
)

FindPackagesRecursive that returns PackageSegments

Public function

void

 

FindPackagesRecursive

(
    TArray< FPackagePath >& OutPackage...,
    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

Public function Static

IPackageReso...

 

Get()

Returns the package resource manager. It is illegal to call Get before calling initialize.

Public function Static

FSetPackageR...

 

GetSetPackageResourceManagerDelegate()

Public function Static

void

 

Initialize()

Call during engine startup to choose the appropriate PackageResourceManager for the current configuration and construct it and bind it to be returned from Get

Public function

void

 

IteratePackagesInLocalOnlyDirectory

(
    FStringView RootDir,
    FPackagePathVisitor Callback
)

Call the callback on all packages in the given local path

Public function

void

 

IteratePackagesInLocalOnlyDirectory

(
    FStringView RootDir,
    FPackageSegmentVisitor Callback
)

IteratePackagesInLocalOnlyDirectory that takes a FPackageSegmentStatVisitor

Public function

void

 

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

Public function

void

 

IteratePackagesInPath

(
    FStringView PackageMount,
    FStringView FileMount,
    FStringView RootRelPath,
    FPackageSegmentVisitor Callback
)

IteratePackagesInPath that takes a FPackageSegmentVisitor

Public function

void

 

IteratePackagesStatInLocalOnlyDirectory

(
    FStringView RootDir,
    FPackageSegmentStatVisitor Callback
)

IteratePackagesStatInLocalOnlyDirectory that takes a FPackageSegmentStatVisitor

Public function

void

 

IteratePackagesStatInLocalOnlyDirectory

(
    FStringView RootDir,
    FPackagePathStatVisitor Callback
)

Call the callback - with stat data - on all packages in the given local path

Public function

void

 

IteratePackagesStatInPath

(
    FStringView PackageMount,
    FStringView FileMount,
    FStringView RootRelPath,
    FPackageSegmentStatVisitor Callback
)

IteratePackagesStatInPath that takes a FPackageSegmentVisitor

Public function

void

 

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

Public function

FOpenAsyncPa...

 

OpenAsyncReadExternalResource

(
    EPackageExternalResource ResourceTy...,
    FStringView Identifier
)

Open an IAsyncReadFileHandle to asynchronously read the bytes of the given ExternalResource.

Public function

FOpenAsyncPa...

 

OpenAsyncReadPackage

(
    const FPackagePath& PackagePath,
    EPackageSegment PackageSegment
)

OpenAsyncReadPackage that takes a PackageSegment

Public function

FOpenAsyncPa...

 

OpenAsyncReadPackage

(
    const FPackagePath& PackagePath
)

Open an IAsyncReadFileHandle to asynchronously read the bytes of the package

Public function

IMappedFileH...

 

OpenMappedHandleToPackage

(
    const FPackagePath& PackagePath,
    FPackagePath* OutUpdatedPath
)

Open an IMappedFileHandle to the package, if the PackageResourceManager supports it

Public function

IMappedFileH...

 

OpenMappedHandleToPackage

(
    const FPackagePath& PackagePath,
    EPackageSegment PackageSegment,
    FPackagePath* OutUpdatedPath
)

OpenMappedHandleToPackage that takes a PackageSegment

Public function

TUniquePtr< ...

 

OpenReadExternalResource

(
    EPackageExternalResource ResourceTy...,
    FStringView Identifier
)

Open a seekable binary FArchive to read the bytes of the given External Resource.

Public function

FOpenPackage...

 

OpenReadPackage

(
    const FPackagePath& PackagePath,
    FPackagePath* OutUpdatedPath
)

Open an FArchive to read the bytes of the package

Public function

FOpenPackage...

 

OpenReadPackage

(
    const FPackagePath& PackagePath,
    EPackageSegment PackageSegment,
    FPackagePath* OutUpdatedPath
)

OpenReadPackage that takes a PackageSegment

Public function Static

void

 

Shutdown()

Call during engine shutdown to free the PackageResourceManager that was created by Initialize; Get will and return nullptr from this point on

Public function

bool

 

SupportsLocalOnlyPaths()

Report whether the PackageResourceManager supports PackagePaths that are unmounted LocalPaths

Public function

bool

 

SupportsPackageOnlyPaths()

Report whether the PackageResourceManager supports PackagePaths that are unmounted PackageNames

Public function

bool

 

TryMatchCaseOnDisk

(
    const FPackagePath& PackagePath,
    FPackagePath* OutNormalizedPat...
)

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)

Public function Static

bool

 

TryRegisterPreloadableArchive

(
    const FPackagePath& PackagePath,
    const TSharedPtr< FPreloadableArchi...,
    const FOpenPackageResult& PackageF...
)

Preloading Package Archives.

Public function Static

bool

 

TryTakePreloadableArchive

(
    const FPackagePath& PackagePath,
    FOpenPackageResult& OutResult
)

Look up an FPreloadableFile instance registered for the given PackagePath, and return an FOpenPackageResult from it

Public function Static

bool

 

UnRegisterPreloadableArchive

(
    const FPackagePath& PackagePath
)

Remove any FPreloadableArchive instance that is registered for the given PackagePath.

Typedefs

Name

Description

FPackagePathStatVisitor

Return value specifies whether iteration should continue

FPackagePathVisitor

Return value specifies whether iteration should continue

FPackageSegmentStatVisitor

Return value specifies whether iteration should continue

FPackageSegmentVisitor

Return value specifies whether iteration should continue

Constants