Navigation
API > API/Runtime > API/Runtime/PakFile
Platform file wrapper to be able to use pak files.
| Name | FPakPlatformFile |
| Type | class |
| Header File | /Engine/Source/Runtime/PakFile/Public/IPlatformFilePak.h |
| Include Path | #include "IPlatformFilePak.h" |
Syntax
class FPakPlatformFile : public IPlatformFile
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPakPlatformFile() |
Constructor. | IPlatformFilePak.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FPakPlatformFile() |
Destructor. | IPlatformFilePak.h |
Structs
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| bMountFailOnMissingUtoc | bool | IPlatformFilePak.h | |
| PakSignatureFileCache | TMap< FName, TSharedPtr< const struct FPakSignatureFile, ESPMode::ThreadSafe > > | Internal cache of pak signature files. | IPlatformFilePak.h |
| PakSignatureFileCacheLock | FCriticalSection | IPlatformFilePak.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bLookLooseFirst | bool | If true (via -looklocalfirst) then loose/non-ufs files will be looked for before looking in the .pak file this respects IsNonPakFilenameAllowed() | IPlatformFilePak.h | |
| bSigned | bool | True if this we're using signed content. | IPlatformFilePak.h | |
| ExcludedNonPakExtensions | TSet< FName > | Cache of extensions that we automatically reject if not found in pak file | IPlatformFilePak.h | |
| GameUserSettingsIniFilename | FString | The filename for the gameusersettings ini file, used for excluding ini files, but not gameusersettings | IPlatformFilePak.h | |
| IniFileExtension | FString | The extension used for ini files, used for excluding ini files | IPlatformFilePak.h | |
| IoDispatcherFileBackend | TSharedPtr< UE::IoStore::IFileIoDispatcherBackend > | IPlatformFilePak.h | ||
| LowerLevel | IPlatformFile * | Wrapped file | IPlatformFilePak.h | |
| PackageStoreBackend | TSharedPtr< FFilePackageStoreBackend > | IPlatformFilePak.h | ||
| PakFiles | TArray< FPakListEntry > | List of all available pak files. | IPlatformFilePak.h | |
| PakListCritical | FTransactionallySafeCriticalSection | Synchronization object for accessing the list of currently mounted pak files. | IPlatformFilePak.h | |
| PendingEncryptedPakFiles | TArray< FPakListDeferredEntry > | List of all pak filenames with dynamic encryption where we don't have the key yet | IPlatformFilePak.h | |
| RetireReadersHandle | FTSTicker::FDelegateHandle | IPlatformFilePak.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AnyChunksAvailable() |
Returns true if any of the mounted or pending pak files are chunks (filenames starting pakchunkN) | IPlatformFilePak.h | |
FString ConvertToAbsolutePathForExternalAppForRead
(
const TCHAR* Filename |
IPlatformFilePak.h | ||
FString ConvertToAbsolutePathForExternalAppForWrite
(
const TCHAR* Filename |
IPlatformFilePak.h | ||
FString ConvertToPakRelativePath
(
const TCHAR* Filename, |
Converts a filename to a path inside pak file. | IPlatformFilePak.h | |
virtual bool CopyFile
(
const TCHAR* To, |
IPlatformFilePak.h | ||
virtual bool CreateDirectory
(
const TCHAR* Directory |
IPlatformFilePak.h | ||
virtual bool CreateDirectoryTree
(
const TCHAR* Directory |
IPlatformFilePak.h | ||
virtual bool DeleteDirectory
(
const TCHAR* Directory |
IPlatformFilePak.h | ||
virtual bool DeleteDirectoryRecursively
(
const TCHAR* Directory |
IPlatformFilePak.h | ||
virtual bool DeleteFile
(
const TCHAR* Filename |
IPlatformFilePak.h | ||
virtual bool DirectoryExists
(
const TCHAR* Directory |
IPlatformFilePak.h | ||
virtual bool FileExists
(
const TCHAR* Filename |
IPlatformFilePak.h | ||
virtual int64 FileSize
(
const TCHAR* Filename |
IPlatformFilePak.h | ||
bool FindFileInPakFiles
(
const TCHAR* Filename, |
Finds a file in all available pak files. | IPlatformFilePak.h | |
virtual void FindFiles
(
TArray< FString >& FoundFiles, |
IPlatformFilePak.h | ||
virtual void FindFilesRecursively
(
TArray< FString >& FoundFiles, |
IPlatformFilePak.h | ||
virtual FDateTime GetAccessTimeStamp
(
const TCHAR* Filename |
IPlatformFilePak.h | ||
virtual FString GetFilenameOnDisk
(
const TCHAR* Filename |
IPlatformFilePak.h | ||
virtual IPlatformFile * GetLowerLevel() |
IPlatformFilePak.h | ||
void GetMountedChunkIds
(
TSet< int32 >& OutChunkIds |
Gets a set of the mounted chunk Ids. | IPlatformFilePak.h | |
void GetMountedPakFilenames
(
TArray< FString >& PakFilenames |
Get a list of all pak files which have been successfully mounted | IPlatformFilePak.h | |
void GetMountedPakFilenames
(
TSet< FString >& PakFilenames |
Get a list of all pak files which have been successfully mounted | IPlatformFilePak.h | |
virtual const TCHAR * GetName() |
IPlatformFilePak.h | ||
EChunkLocation::Type GetPakChunkLocation
(
int32 InPakchunkIndex |
Determine location information for a given pakchunk index. | IPlatformFilePak.h | |
void GetPrunedFilenamesInChunk
(
const FString& InPakFilename, |
Get a list of RelativePathFromMount for every file in the given Pak that lives in any of the given chunks. | IPlatformFilePak.h | |
void GetPrunedFilenamesInPakFile
(
const FString& InPakFilename, |
Gets a list of FullPaths (includes Mount directory) for every File in the given Pak's Pruned DirectoryIndex | IPlatformFilePak.h | |
virtual FFileStatData GetStatData
(
const TCHAR* FilenameOrDirectory |
IPlatformFilePak.h | ||
virtual FDateTime GetTimeStamp
(
const TCHAR* Filename |
IPlatformFilePak.h | ||
virtual void GetTimeStampPair
(
const TCHAR* FilenameA, |
IPlatformFilePak.h | ||
void HandleMountCommand
(
const TCHAR* Cmd, |
IPlatformFilePak.h | ||
void HandlePakCorruptCommand
(
const TCHAR* Cmd, |
IPlatformFilePak.h | ||
void HandlePakListCommand
(
const TCHAR* Cmd, |
BEGIN Console commands. | IPlatformFilePak.h | |
void HandleReloadPakReadersCommand
(
const TCHAR* Cmd, |
IPlatformFilePak.h | ||
void HandleUnmountCommand
(
const TCHAR* Cmd, |
IPlatformFilePak.h | ||
virtual bool Initialize
(
IPlatformFile* Inner, |
IPlatformFilePak.h | ||
virtual void InitializeNewAsyncIO() |
IPlatformFilePak.h | ||
virtual bool IsReadOnly
(
const TCHAR* Filename |
IPlatformFilePak.h | ||
virtual ESymlinkResult IsSymlink
(
const TCHAR* Filename |
IPlatformFilePak.h | ||
virtual bool IterateDirectory
(
const TCHAR* Directory, |
IPlatformFilePak.h | ||
virtual bool IterateDirectoryRecursively
(
const TCHAR* Directory, |
IPlatformFilePak.h | ||
virtual bool IterateDirectoryStat
(
const TCHAR* Directory, |
IPlatformFilePak.h | ||
virtual bool IterateDirectoryStatRecursively
(
const TCHAR* Directory, |
IPlatformFilePak.h | ||
virtual void MakeUniquePakFilesForTheseFiles
(
const TArray< TArray< FString > >& InFiles |
Make unique in memory pak files from a list of named files | IPlatformFilePak.h | |
bool Mount
(
const TCHAR* InPakFilename, |
Mounts a pak file at the specified path. | IPlatformFilePak.h | |
bool Mount
(
const FPakMountArgs& MountArgs, |
Mounts a pak file at the specified path. | IPlatformFilePak.h | |
int32 MountAllPakFiles
(
const TArray< FString >& PakFolders |
IPlatformFilePak.h | ||
int32 MountAllPakFiles
(
const TArray< FString >& PakFolders, |
IPlatformFilePak.h | ||
virtual bool MoveFile
(
const TCHAR* To, |
IPlatformFilePak.h | ||
virtual IAsyncReadFileHandle * OpenAsyncRead
(
const TCHAR* Filename, |
IPlatformFilePak.h | ||
virtual FOpenMappedResult OpenMappedEx
(
const TCHAR* Filename, |
IPlatformFilePak.h | ||
virtual IFileHandle * OpenRead
(
const TCHAR* Filename, |
IPlatformFilePak.h | ||
virtual IFileHandle * OpenWrite
(
const TCHAR* Filename, |
IPlatformFilePak.h | ||
void OptimizeMemoryUsageForMountedPaks() |
IPlatformFilePak.h | ||
void RefreshPakChunkIndicies () |
Requests that all the known paks re-evaluate and set their PakchunkIndex value. | IPlatformFilePak.h | |
void ReleaseOldReaders() |
IPlatformFilePak.h | ||
bool ReloadPakReaders() |
Re-creates all the pak readers | IPlatformFilePak.h | |
virtual void SetAsyncMinimumPriority
(
EAsyncIOPriorityAndFlags Priority |
IPlatformFilePak.h | ||
virtual void SetLowerLevel
(
IPlatformFile* NewLowerLevel |
IPlatformFilePak.h | ||
virtual bool SetReadOnly
(
const TCHAR* Filename, |
IPlatformFilePak.h | ||
virtual void SetTimeStamp
(
const TCHAR* Filename, |
IPlatformFilePak.h | ||
virtual bool ShouldBeUsed
(
IPlatformFile* Inner, |
IPlatformFilePak.h | ||
void Tick() |
IPlatformFilePak.h | ||
bool Unmount
(
const TCHAR* InPakFilename |
IPlatformFilePak.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void BroadcastPakChunkSignatureCheckFailure
(
const FPakChunkSignatureCheckFailedData& InData |
Broadcast a signature check failure through any registered delegates in a thread safe way. | IPlatformFilePak.h | |
static void BroadcastPakPrincipalSignatureTableCheckFailure
(
const FString& InFilename |
Broadcast a principal signature table failure through any registered delegates in a thread safe way. | IPlatformFilePak.h | |
static bool CheckIfPakFilesExist
(
IPlatformFile* LowLevelFile, |
Checks if pak files exist in any of the known pak file locations. | IPlatformFilePak.h | |
static void FindAllPakFiles
(
IPlatformFile* LowLevelFile, |
Finds all pak files in the known pak folders | IPlatformFilePak.h | |
static bool FindFileInPakFiles
(
TArray< FPakListEntry >& Paks, |
Finds a file in the specified pak files. | IPlatformFilePak.h | |
static void FindPakFilesInDirectory
(
IPlatformFile* LowLevelFile, |
Finds all pak files in the given directory. | IPlatformFilePak.h | |
static void ForeachPackageInIostoreWhile
(
TFunctionRef< bool(FName)> Predicate |
Iterates Iostore Container while Predicate returns true | IPlatformFilePak.h | |
static FFilenameSecurityDelegate & GetFilenameSecurityDelegate() |
Access static delegate for loose file security. | IPlatformFilePak.h | |
static void GetFilenamesFromIostoreByBlockIndex
(
const FString& InContainerName, |
Returns the RelativePathFromMount Filename for every Filename found in the Iostore Container that relates to the provided block indexes | IPlatformFilePak.h | |
static void GetFilenamesFromIostoreContainer
(
const FString& InContainerName, |
Returns the RelativePathFromMount Filename for every file found in the given Iostore Container | IPlatformFilePak.h | |
static const TCHAR * GetMountStartupPaksWildCard() |
Get the wild card pattern used to identify paks to load on startup | IPlatformFilePak.h | |
static FPakCustomEncryptionDelegate & GetPakCustomEncryptionDelegate() |
Access static delegate for custom encryption. | IPlatformFilePak.h | |
static void GetPakEncryptionKey
(
FAES::FAESKey& OutKey, |
Helper function for accessing pak encryption key | IPlatformFilePak.h | |
static void GetPakFolders
(
const TCHAR* CmdLine, |
Gets all pak file locations. | IPlatformFilePak.h | |
static int32 GetPakOrderFromPakFilePath
(
const FStringView PakFilePath |
Hardcode default load ordering of game main pak -> game content -> engine content -> saved dir would be better to make this config but not even the config system is initialized here so we can't do that | IPlatformFilePak.h | |
static FPakSetIndexSettings & GetPakSetIndexSettingsDelegate() |
Access static delegate for setting PakIndex settings. | IPlatformFilePak.h | |
static TSharedPtr< const struct FPakSignatureFile, ESPMode::ThreadSafe > GetPakSignatureFile
(
const TCHAR* InFilename |
Load a pak signature file. | IPlatformFilePak.h | |
static FPakSigningFailureHandlerData & GetPakSigningFailureHandlerData() |
Access static delegate for handling a Pak signature check failure. | IPlatformFilePak.h | |
static const TCHAR * GetTypeName() |
Get the unique name for the pak platform file layer | IPlatformFilePak.h | |
static bool IsPakFileInstalled
(
const FString& InFilename |
Checks with any current chunk installation system if the given pak file is installed | IPlatformFilePak.h | |
static void RemoveCachedPakSignaturesFile
(
const TCHAR* InFilename |
Remove the intenrally cached pointer to the signature file for the specified pak | IPlatformFilePak.h | |
static void SetMountStartupPaksWildCard
(
const FString& WildCard |
Overrides the wildcard used for searching paks. Call before initialization | IPlatformFilePak.h |
Deprecated Functions
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UE_DEPRECATED
(
"5.1", |
IPlatformFilePak.h |