#include <IPlatformFilePak.h>
|
| PAKFILE_API bool | RecreatePakReaders (IPlatformFile *LowerLevel) |
| |
| virtual const FString & | PakGetPakFilename () const override |
| |
| virtual bool | PakContains (const FString &FullPath) const override |
| |
| virtual int32 | PakGetPakchunkIndex () const override |
| |
| virtual void | PakVisitPrunedFilenames (IPlatformFile::FDirectoryVisitor &Visitor) const override |
| |
| virtual const FString & | PakGetMountPoint () const override |
| |
| void | SetUnderlyingCacheTrimDisabled (bool InUnderlyingCacheTrimDisabled) |
| |
| bool | GetUnderlyingCacheTrimDisabled (void) |
| |
| void | SetCacheType (ECacheType InCacheType) |
| |
| ECacheType | GetCacheType (void) |
| |
| void | SetCacheIndex (int32 InCacheIndex) |
| |
| int32 | GetCacheIndex (void) |
| |
| void | SetIsMounted (bool bInIsMounted) |
| |
| bool | GetIsMounted () const |
| |
| PAKFILE_API | FPakFile (IPlatformFile *LowerLevel, const TCHAR *Filename, bool bIsSigned, bool bLoadIndex=true) |
| |
| bool | IsValid () const |
| |
| PAKFILE_API bool | PassedSignatureChecks () const |
| |
| const FString & | GetFilename () const |
| |
| FName | GetFilenameName () const |
| |
| int64 | TotalSize () const |
| |
| virtual int32 | GetNumFiles () const override |
| |
| PAKFILE_API void | GetPrunedFilenames (TArray< FString > &OutFileList) const |
| |
| PAKFILE_API void | GetPrunedFilenamesInChunk (const TArray< int32 > &InChunkIDs, TArray< FString > &OutFileList) const |
| |
| PAKFILE_API FSharedPakReader | GetSharedReader (IPlatformFile *LowerLevel) |
| |
| PAKFILE_API void | ReturnSharedReader (FArchive *SharedReader) |
| |
| PAKFILE_API void | ReleaseOldReaders (double MaxAgeSeconds) |
| |
| PAKFILE_API EFindResult | Find (const FString &FullPath, FPakEntry *OutEntry) const |
| |
| void | SetMountPoint (const TCHAR *Path) |
| |
| const FString & | GetMountPoint () const |
| |
| template<class ContainerType > |
| void | FindPrunedFilesAtPath (ContainerType &OutFiles, const TCHAR *InPath, bool bIncludeFiles=true, bool bIncludeDirectories=false, bool bRecursive=false) const |
| |
| PAKFILE_API void | FindPrunedFilesAtPath (const TCHAR *InPath, TArray< FString > &OutFiles, bool bIncludeFiles=true, bool bIncludeDirectories=false, bool bRecursive=false) const |
| |
| const FPakDirectory * | FindPrunedDirectory (const TCHAR *InPath) const |
| |
| bool | DirectoryExistsInPruned (const TCHAR *InPath) const |
| |
| PAKFILE_API bool | Check () |
| |
| const FPakInfo & | GetInfo () const |
| |
| const FDateTime & | GetTimestamp () const |
| |
| bool | HasFilenames () const |
| |
| void | ReadHashFromPayload (const FPakEntry &PakEntry, uint8 *OutBuffer) |
| |
| | FRefCountBase ()=default |
| |
| virtual | ~FRefCountBase ()=default |
| |
| | FRefCountBase (const FRefCountBase &Rhs)=delete |
| |
| FRefCountBase & | operator= (const FRefCountBase &Rhs)=delete |
| |
| FReturnedRefCountValue | AddRef () const |
| |
| uint32 | Release () const |
| |
| uint32 | GetRefCount () const |
| |
|
| static PAKFILE_API uint64 | HashPath (const TCHAR *RelativePathFromMount, uint64 Seed, int32 PakFileVersion) |
| |
| static PAKFILE_API void | EncodePakEntriesIntoIndex (int32 InNumEntries, const ReadNextEntryFunction &InReadNextEntry, const TCHAR *InPakFilename, const FPakInfo &InPakInfo, const FString &MountPoint, int32 &OutNumEncodedEntries, int32 &OutNumDeletedEntries, uint64 *OutPathHashSeed, FDirectoryIndex *OutDirectoryIndex, FPathHashIndex *OutPathHashIndex, TArray< uint8 > &OutEncodedPakEntries, TArray< FPakEntry > &OutNonEncodableEntries, TMap< uint64, FString > *InOutCollisionDetection, int32 PakFileVersion) |
| |
| static PAKFILE_API const FPakEntryLocation * | FindLocationFromIndex (const FString &FullPath, const FString &MountPoint, const FPathHashIndex &PathHashIndex, uint64 PathHashSeed, int32 PakFileVersion) |
| |
| static PAKFILE_API const FPakEntryLocation * | FindLocationFromIndex (const FString &FullPath, const FString &MountPoint, const FDirectoryIndex &DirectoryIndex) |
| |
| static PAKFILE_API EFindResult | GetPakEntry (const FPakEntryLocation &FPakEntryLocation, FPakEntry *OutEntry, const TArray< uint8 > &EncodedPakEntries, const TArray< FPakEntry > &Files, const FPakInfo &Info) |
| |
| static PAKFILE_API void | PruneDirectoryIndex (FDirectoryIndex &InOutDirectoryIndex, FDirectoryIndex *PrunedDirectoryIndex, const FString &MountPoint) |
| |
| static void | MakeDirectoryFromPath (FString &Path) |
| |
| static bool | IsPathInDirectoryFormat (const FString &Path) |
| |
| static FString | PakPathCombine (FStringView Parent, FStringView Child) |
| |
| static FString | PakPathCombine (FStringView Parent, FUtf8StringView Child) |
| |
| static bool | SplitPathInline (FStringView &InOutPath, FStringView &OutFilename) |
| |
| static bool | SplitPathInline (FString &InOutPath, FString &OutFilename) |
| |
| static bool | GetRelativePathFromMountInline (FString &Child, const FString &MountPoint) |
| |
| static const TCHAR * | GetRelativeFilePathFromMountPointer (const FString &Child, const FString &MountPoint) |
| |
| static PAKFILE_API bool | IsPakKeepFullDirectory () |
| |
| static PAKFILE_API bool | IsPakWritePathHashIndex () |
| |
| static PAKFILE_API bool | IsPakWriteFullDirectoryIndex () |
| |
| static PAKFILE_API void | SaveIndexInternal_DirectoryIndex (FArchive &Ar, const FDirectoryIndex &DirectoryTMap) |
| |
◆ FDirectoryIndex
Index data that keeps an in-memory directoryname/filename tree to map a Filename to an FPakEntryLocation
◆ FPathHashIndex
◆ ReadNextEntryFunction
Read a list of (Filename, FPakEntry) pairs from a provided enumeration, attempt to encode each one, store each one in the appropriate given encoded and/or unencoded array, and populate the given Directories to map each filename to the location for the FPakEntry
- Parameters
-
| InNumEntries | How many entries will be read from ReadNextEntryFunction |
| ReadNextEntryFunction | Callback called repeatedly to enumerate the (Filename,FPakEntry) pairs to be encoded |
| InPakFilename | Filename for the pak containing the files, used to create the hashseed for the given pak |
| InPakInfo | PakInfo for the given pak, used for serialization flags |
| MountPoint | Directory into which the pak will be mounted, used to create the Directory and PathHash indexes |
| OutNumEncodedEntries | How many entries were written to the bytes in OutEncodedPakEntries |
| OutNumDeletedEntries | How many entries were skipped and not stored because the input FPakEntry was a Delete record |
| OutPathHashSeed | optional out param to get a copy of the pakfile-specific hashseed |
| OutDirectoryIndex | optional output FDirectoryIndex |
| OutPathHashIndex | optional output FPathHashIndex |
| OutEncodedPakEntries | array of bytes into which the encoded FPakEntries are stored. Values in OutDirectoryIndex and OutPathHashIndex can be offsets into this array indicated the start point for the encoding of the given FPakEntry |
| OutNonEncodableEntries | A list of all the FPakEntries that could not be encoded. Values in OutDirectoryIndex and OutPathHashIndex can be indices into this list. |
| InOutCollisionDetection | Optional parameter to detect hash collisions. If present, each hashed filename will be check()'d for a collision against a different filename in InOutCollisionDetection, and will be added into InOutCollisionDetection |
| PakFileVersion | Version of the pakfile containing the index, to support legacy formats |
◆ ECacheType
Pak files can share a cache or have their own
| Enumerator |
|---|
| Shared | |
| Individual | |
◆ EFindResult
Finds an entry in the pak file matching the given filename.
- Parameters
-
| Filename | File to find. |
| OutEntry | The optional address of an FPakEntry instance where the found file information should be stored. Pass NULL to only check for file existence. |
- Returns
- Returns true if the file was found, false otherwise.
| Enumerator |
|---|
| NotFound | |
| Found | |
| FoundDeleted | |
◆ EIteratorType
◆ FPakFile()
Creates a pak file using the supplied file handle.
- Parameters
-
| LowerLevel | Lower level platform file. |
| Filename | Filename. |
| bIsSigned | = true if the pak is signed. |
◆ Check()
Checks the validity of the pak data by reading out the data for every file in the pak
- Returns
- true if the pak file is valid
◆ DirectoryExistsInPruned()
| bool FPakFile::DirectoryExistsInPruned |
( |
const TCHAR * |
InPath | ) |
const |
|
inline |
Checks if a directory exists in pak file.
- Parameters
-
- Returns
- true if the given path exists in pak file, false otherwise.
◆ EncodePakEntriesIntoIndex()
| void FPakFile::EncodePakEntriesIntoIndex |
( |
int32 |
InNumEntries, |
|
|
const ReadNextEntryFunction & |
InReadNextEntry, |
|
|
const TCHAR * |
InPakFilename, |
|
|
const FPakInfo & |
InPakInfo, |
|
|
const FString & |
MountPoint, |
|
|
int32 & |
OutNumEncodedEntries, |
|
|
int32 & |
OutNumDeletedEntries, |
|
|
uint64 * |
OutPathHashSeed, |
|
|
FDirectoryIndex * |
OutDirectoryIndex, |
|
|
FPathHashIndex * |
OutPathHashIndex, |
|
|
TArray< uint8 > & |
OutEncodedPakEntries, |
|
|
TArray< FPakEntry > & |
OutNonEncodableEntries, |
|
|
TMap< uint64, FString > * |
InOutCollisionDetection, |
|
|
int32 |
PakFileVersion |
|
) |
| |
|
static |
◆ Find()
◆ FindLocationFromIndex() [1/2]
Lookup the FPakEntryLocation stored in the given DirectoryIndex, return nullptr if not found
◆ FindLocationFromIndex() [2/2]
Lookup the FPakEntryLocation stored in the given PathHashIndex, return nullptr if not found
◆ FindPrunedDirectory()
Finds a directory in pak file.
- Parameters
-
- Returns
- Pointer to a map with directory contents if the directory was found, NULL otherwise.
◆ FindPrunedFilesAtPath() [1/2]
Looks for files or directories within the Pruned DirectoryIndex of the pak file. The Pruned DirectoryIndex does not have entries for most Files in the pak; they were removed to save memory. A project can specify which FileNames and DirectoryNames can be marked to keep in the DirectoryIndex; see FPakFile::FIndexSettings and FPakFile::PruneDirectoryIndex Returned paths are full paths (include the mount point)
- Parameters
-
| InPath | Path to look for files or folder at. |
| OutFiles | List of files or folder matching search criteria. |
| bIncludeFiles | If true OutFiles will include matching files. |
| bIncludeDirectories | If true OutFiles will include matching folders. |
| bRecursive | If true, sub-folders will also be checked. |
◆ FindPrunedFilesAtPath() [2/2]
template<class ContainerType >
| void FPakFile::FindPrunedFilesAtPath |
( |
ContainerType & |
OutFiles, |
|
|
const TCHAR * |
InPath, |
|
|
bool |
bIncludeFiles = true, |
|
|
bool |
bIncludeDirectories = false, |
|
|
bool |
bRecursive = false |
|
) |
| const |
|
inline |
◆ GetCacheIndex()
◆ GetCacheType()
◆ GetFilename()
| const FString & FPakFile::GetFilename |
( |
| ) |
const |
|
inline |
Gets pak filename.
- Returns
- Pak filename.
◆ GetFilenameName()
| FName FPakFile::GetFilenameName |
( |
| ) |
const |
|
inline |
◆ GetInfo()
| const FPakInfo & FPakFile::GetInfo |
( |
| ) |
const |
|
inline |
Gets this pak file info.
- Returns
- Info about this pak file.
◆ GetIsMounted()
| bool FPakFile::GetIsMounted |
( |
| ) |
const |
|
inline |
◆ GetMountPoint()
| const FString & FPakFile::GetMountPoint |
( |
| ) |
const |
|
inline |
Gets pak file mount point.
- Returns
- Mount point path.
◆ GetNumFiles()
Gets the number of files in this pak.
Implements IPakFile.
◆ GetPakEntry()
Returns the FPakEntry pointed to by the given FPakEntryLocation inside the given EncodedPakEntries or Files Can return Found or Deleted; if the FPakEntryLocation is invalid this function assumes the FPakEntry exists in this pack but as a deleted file If OutEntry is non-null, populates it with a copy of the FPakEntry found, or sets it to an FPakEntry with SetDeleteRecord(true) if not found
◆ GetPrunedFilenames()
| void FPakFile::GetPrunedFilenames |
( |
TArray< FString > & |
OutFileList | ) |
const |
Returns the FullPath (includes Mount) Filename found in Pruned DirectoryIndex
◆ GetPrunedFilenamesInChunk()
| void FPakFile::GetPrunedFilenamesInChunk |
( |
const TArray< int32 > & |
InChunkIDs, |
|
|
TArray< FString > & |
OutFileList |
|
) |
| const |
Returns the RelativePathFromMount Filename for every Filename found in the Pruned DirectoryIndex that points to a PakEntry in the given Chunk
◆ GetRelativeFilePathFromMountPointer()
| static const TCHAR * FPakFile::GetRelativeFilePathFromMountPointer |
( |
const FString & |
Child, |
|
|
const FString & |
MountPoint |
|
) |
| |
|
inlinestatic |
Helper function to return Filename's relative path from the mount point. Returns null if Child is not equal to MountPoint and is not a child path under MountPoint, else returns pointer to the offset within Child after the MountPoint. If child equals MountPoint, returns null; The MountPoint itself is not a valid Filename, since Filenames must have non-zero length and are added on to the MountPoint.
◆ GetRelativePathFromMountInline()
| static bool FPakFile::GetRelativePathFromMountInline |
( |
FString & |
Child, |
|
|
const FString & |
MountPoint |
|
) |
| |
|
inlinestatic |
Helper function to return Child's relative path from the mount point. Returns false if Child is not equal to MountPoint and is not a child path under MountPoint, else returns true. Edits Child only if returning true, setting it to the relative path. If child equals MountPoint, returns true and sets Child to the relative path to the MountPoint, which is "/"
◆ GetSharedReader()
Gets shared pak file archive for given thread.
- Returns
- Pointer to pak file archive used to read data from pak.
◆ GetTimestamp()
| const FDateTime & FPakFile::GetTimestamp |
( |
| ) |
const |
|
inline |
Gets this pak file's tiemstamp.
- Returns
- Timestamp.
◆ GetUnderlyingCacheTrimDisabled()
| bool FPakFile::GetUnderlyingCacheTrimDisabled |
( |
void |
| ) |
|
|
inline |
◆ HasFilenames()
| bool FPakFile::HasFilenames |
( |
| ) |
const |
|
inline |
Returns whether filenames currently exist in the DirectoryIndex for all files in the Pak.
- Returns
- true if filenames are present for all FPakEntry, false otherwise.
◆ HashPath()
Hash the given full-path filename using the hash function used by FPakFiles, with the given FPakFile-specific seed, with version provided for legacy pak files that used different hash function
◆ IsPakKeepFullDirectory()
| bool FPakFile::IsPakKeepFullDirectory |
( |
| ) |
|
|
static |
◆ IsPakWriteFullDirectoryIndex()
| bool FPakFile::IsPakWriteFullDirectoryIndex |
( |
| ) |
|
|
static |
◆ IsPakWritePathHashIndex()
| bool FPakFile::IsPakWritePathHashIndex |
( |
| ) |
|
|
static |
◆ IsPathInDirectoryFormat()
| static bool FPakFile::IsPathInDirectoryFormat |
( |
const FString & |
Path | ) |
|
|
inlinestatic |
◆ IsValid()
| bool FPakFile::IsValid |
( |
| ) |
const |
|
inline |
Checks if the pak file is valid.
- Returns
- true if this pak file is valid, false otherwise.
◆ MakeDirectoryFromPath()
| static void FPakFile::MakeDirectoryFromPath |
( |
FString & |
Path | ) |
|
|
inlinestatic |
◆ PakContains()
| virtual bool FPakFile::PakContains |
( |
const FString & |
Filename | ) |
const |
|
inlineoverridevirtual |
Return whether the Pak has an entry for the given FileName. Not necessarily exclusive; other Patch Paks may have their own copy of the same File.
- Parameters
-
Implements IPakFile.
◆ PakGetMountPoint()
| virtual const FString & FPakFile::PakGetMountPoint |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ PakGetPakchunkIndex()
◆ PakGetPakFilename()
| virtual const FString & FPakFile::PakGetPakFilename |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ PakPathCombine() [1/2]
◆ PakPathCombine() [2/2]
◆ PakVisitPrunedFilenames()
Calls the given Visitor on every FileName in the Pruned Directory Index. FileNames passed to the Vistory are the RelativePath from the Mount of the PakFile The Pruned Directory Index at Runtime contains only the DirectoryIndexKeepFiles-specified subset of FilesNames and DirectoryNames that exist in the PakFile
Implements IPakFile.
◆ PassedSignatureChecks()
| bool FPakFile::PassedSignatureChecks |
( |
| ) |
const |
Checks if the pak has valid chunk signature checking data, and that the data passed the initial signing check
- Returns
- true if this pak file has passed the initial signature checking phase
◆ PruneDirectoryIndex()
Given a directory index, remove entries from it that are directed by ini to not have filenames kept at runtime.
InOutDirectoryIndex - The full index from which to potentially remove entries OutDirectoryIndex - If null, InOutDirectoryIndex will have pruned entries removed. If non-null, InOutDirectoryIndex will not be modified, and PrunedDirectoryIndex will have kept values added. MountPoint The mount point for the pak containing the index, used to provide the fullpath for filenames in the DirectoryIndex for comparison against paths in ini
◆ ReadHashFromPayload()
◆ RecreatePakReaders()
Recreates the pak reader for each thread
◆ ReleaseOldReaders()
| void FPakFile::ReleaseOldReaders |
( |
double |
MaxAgeSeconds | ) |
|
◆ ReturnSharedReader()
| void FPakFile::ReturnSharedReader |
( |
FArchive * |
SharedReader | ) |
|
◆ SaveIndexInternal_DirectoryIndex()
◆ SetCacheIndex()
| void FPakFile::SetCacheIndex |
( |
int32 |
InCacheIndex | ) |
|
|
inline |
◆ SetCacheType()
◆ SetIsMounted()
| void FPakFile::SetIsMounted |
( |
bool |
bInIsMounted | ) |
|
|
inline |
◆ SetMountPoint()
| void FPakFile::SetMountPoint |
( |
const TCHAR * |
Path | ) |
|
|
inline |
Sets the pak file mount point.
- Parameters
-
| Path | New mount point path. |
◆ SetUnderlyingCacheTrimDisabled()
| void FPakFile::SetUnderlyingCacheTrimDisabled |
( |
bool |
InUnderlyingCacheTrimDisabled | ) |
|
|
inline |
◆ SplitPathInline() [1/2]
| static bool FPakFile::SplitPathInline |
( |
FString & |
InOutPath, |
|
|
FString & |
OutFilename |
|
) |
| |
|
inlinestatic |
◆ SplitPathInline() [2/2]
Helper function to split a PakDirectoryIndex-Formatted PathName into its PakDirectoryIndex-Formatted parent directory and the CleanFileName
◆ TotalSize()
| int64 FPakFile::TotalSize |
( |
| ) |
const |
|
inline |
◆ FPakPlatformFile
◆ FRefCountBase
The documentation for this class was generated from the following files: