engine
 
载入中...
搜索中...
未找到
类 | Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
FPakPlatformFile类 参考

Platform file wrapper to be able to use pak files. 更多...

#include <IPlatformFilePak.h>

+ 类 FPakPlatformFile 继承关系图:

类

class  FPreventDuplicatesVisitorBase
 Helper class to filter out files which have already been visited in one of the pak files. 更多...
 

Public 成员函数

bool AnyChunksAvailable () const
 Returns true if any of the mounted or pending pak files are chunks (filenames starting pakchunkN)
 
FString ConvertToAbsolutePathForExternalAppForRead (const TCHAR *Filename) override
 Converts passed in filename to use an absolute path (for reading). 更多...
 
FString ConvertToAbsolutePathForExternalAppForWrite (const TCHAR *Filename) override
 Converts passed in filename to use an absolute path (for writing) 更多...
 
FString ConvertToPakRelativePath (const TCHAR *Filename, const FPakFile *Pak)
 Converts a filename to a path inside pak file. 更多...
 
virtual bool CopyFile (const TCHAR *To, const TCHAR *From, EPlatformFileRead ReadFlags=EPlatformFileRead::None, EPlatformFileWrite WriteFlags=EPlatformFileWrite::None) override
 Copy a file. 更多...
 
virtual bool CreateDirectory (const TCHAR *Directory) override
 Create a directory and return true if the directory was created or already existed.
 
virtual bool CreateDirectoryTree (const TCHAR *Directory) override
 Create a directory, including any parent directories and return true if the directory was created or already existed.
 
virtual bool DeleteDirectory (const TCHAR *Directory) override
 Delete a directory and return true if the directory was deleted or otherwise does not exist.
 
virtual bool DeleteDirectoryRecursively (const TCHAR *Directory) override
 Delete all files and subdirectories in a directory, then delete the directory itself 更多...
 
virtual bool DeleteFile (const TCHAR *Filename) override
 Delete a file and return true if the file exists. 更多...
 
virtual bool DirectoryExists (const TCHAR *Directory) override
 Return true if the directory exists.
 
virtual bool FileExists (const TCHAR *Filename) override
 Return true if the file exists.
 
virtual int64 FileSize (const TCHAR *Filename) override
 Return the size of the file, or -1 if it doesn't exist.
 
bool FindFileInPakFiles (const TCHAR *Filename, FPakFile **OutPakFile=nullptr, FPakEntry *OutEntry=nullptr)
 Finds a file in all available pak files. 更多...
 
virtual void FindFiles (TArray< FString > &FoundFiles, const TCHAR *Directory, const TCHAR *FileExtension) override
 Finds all the files within the given directory, with optional file extension filter 更多...
 
virtual void FindFilesRecursively (TArray< FString > &FoundFiles, const TCHAR *Directory, const TCHAR *FileExtension) override
 Finds all the files within the directory tree, with optional file extension filter 更多...
 
 FPakPlatformFile ()
 Constructor. 更多...
 
virtual FDateTime GetAccessTimeStamp (const TCHAR *Filename) override
 Return the last access time of a file. 更多...
 
virtual FString GetFilenameOnDisk (const TCHAR *Filename) override
 For case insensitive filesystems, returns the full path of the file with the same case as in the filesystem
 
virtual IPlatformFile * GetLowerLevel () override
 Gets the platform file wrapped by this file.
 
FORCEINLINE void GetMountedPakFilenames (TArray< FString > &PakFilenames)
 Get a list of all pak files which have been successfully mounted
 
virtual const TCHAR * GetName () const override
 Gets this platform file type name.
 
EChunkLocation::Type GetPakChunkLocation (int32 InPakchunkIndex) const
 Determine location information for a given pakchunk index. 更多...
 
void GetPrunedFilenamesInPakFile (const FString &InPakFilename, TArray< FString > &OutFileList)
 Gets a list of FullPaths (includes Mount directory) for every File in the given Pak's Pruned DirectoryIndex
 
virtual FFileStatData GetStatData (const TCHAR *FilenameOrDirectory) override
 Return the stat data for the given file or directory. 更多...
 
virtual FDateTime GetTimeStamp (const TCHAR *Filename) override
 Return the modification time of a file. 更多...
 
virtual bool Initialize (IPlatformFile *Inner, const TCHAR *CommandLineParam) override
 Initializes platform file. 更多...
 
virtual void InitializeNewAsyncIO () override
 Performs initialization of the platform file after the new async IO has been enabled
 
virtual bool IsReadOnly (const TCHAR *Filename) override
 Return true if the file is read only.
 
virtual bool IterateDirectory (const TCHAR *Directory, FDirectoryVisitor &Visitor)=0
 Call the Visit function of the visitor once for each file or directory in a single directory. 更多...
 
virtual bool IterateDirectory (const TCHAR *Directory, FDirectoryVisitorFunc Visitor)
 Call the visitor once for each file or directory in a single directory. 更多...
 
virtual bool IterateDirectory (const TCHAR *Directory, IPlatformFile::FDirectoryVisitor &Visitor) override
 Call the Visit function of the visitor once for each file or directory in a single directory. 更多...
 
virtual bool IterateDirectoryRecursively (const TCHAR *Directory, FDirectoryVisitor &Visitor)
 Call the Visit function of the visitor once for each file or directory in a directory tree. 更多...
 
virtual bool IterateDirectoryRecursively (const TCHAR *Directory, FDirectoryVisitorFunc Visitor)
 Call the Visit function of the visitor once for each file or directory in a directory tree. 更多...
 
virtual bool IterateDirectoryRecursively (const TCHAR *Directory, IPlatformFile::FDirectoryVisitor &Visitor) override
 Call the Visit function of the visitor once for each file or directory in a directory tree. 更多...
 
virtual bool IterateDirectoryStat (const TCHAR *Directory, FDirectoryStatVisitor &Visitor)=0
 Call the Visit function of the visitor once for each file or directory in a single directory. 更多...
 
virtual bool IterateDirectoryStat (const TCHAR *Directory, FDirectoryStatVisitorFunc Visitor)
 Call the visitor once for each file or directory in a single directory. 更多...
 
virtual bool IterateDirectoryStat (const TCHAR *Directory, IPlatformFile::FDirectoryStatVisitor &Visitor) override
 Call the Visit function of the visitor once for each file or directory in a single directory. 更多...
 
virtual bool IterateDirectoryStatRecursively (const TCHAR *Directory, FDirectoryStatVisitor &Visitor)
 Call the Visit function of the visitor once for each file or directory in a directory tree. 更多...
 
virtual bool IterateDirectoryStatRecursively (const TCHAR *Directory, FDirectoryStatVisitorFunc Visitor)
 Call the Visit function of the visitor once for each file or directory in a directory tree. 更多...
 
virtual bool IterateDirectoryStatRecursively (const TCHAR *Directory, IPlatformFile::FDirectoryStatVisitor &Visitor) override
 Call the Visit function of the visitor once for each file or directory in a directory tree. 更多...
 
virtual void MakeUniquePakFilesForTheseFiles (const TArray< TArray< FString > > &InFiles)
 Make unique in memory pak files from a list of named files
 
bool Mount (const TCHAR *InPakFilename, uint32 PakOrder, const TCHAR *InPath=NULL, bool bLoadIndex=true)
 Mounts a pak file at the specified path. 更多...
 
virtual bool MoveFile (const TCHAR *To, const TCHAR *From) override
 Attempt to move a file. 更多...
 
virtual IAsyncReadFileHandle * OpenAsyncRead (const TCHAR *Filename) override
 Open a file for async reading. 更多...
 
virtual IMappedFileHandle * OpenMapped (const TCHAR *Filename) override
 Open a file for async reading. 更多...
 
virtual IFileHandle * OpenRead (const TCHAR *Filename, bool bAllowWrite=false) override
 Attempt to open a file for reading. 更多...
 
virtual IFileHandle * OpenWrite (const TCHAR *Filename, bool bAppend=false, bool bAllowRead=false) override
 Attempt to open a file for writing. 更多...
 
bool ReloadPakReaders ()
 Re-creates all the pak readers
 
virtual void SetAsyncMinimumPriority (EAsyncIOPriorityAndFlags Priority) override
 Controls if the pak precacher should process precache requests. 更多...
 
virtual void SetLowerLevel (IPlatformFile *NewLowerLevel) override
 Sets the platform file wrapped by this file.
 
virtual bool SetReadOnly (const TCHAR *Filename, bool bNewReadOnlyValue) override
 Attempt to change the read only status of a file. 更多...
 
virtual void SetTimeStamp (const TCHAR *Filename, FDateTime DateTime) override
 Sets the modification time of a file
 
virtual bool ShouldBeUsed (IPlatformFile *Inner, const TCHAR *CmdLine) const override
 Checks if this platform file should be used even though it was not asked to be. 更多...
 
void Tick () override
 Platform file can override this to get a regular tick from the engine
 
virtual ~FPakPlatformFile ()
 Destructor.
 
- Public 成员函数 继承自 IPlatformFile
virtual void AddLocalDirectories (TArray< FString > &LocalDirectories)
 Identifies any platform specific paths that are guaranteed to be local (i.e. 更多...
 
virtual FString ConvertToAbsolutePathForExternalAppForRead (const TCHAR *Filename)
 Converts passed in filename to use an absolute path (for reading). 更多...
 
virtual FString ConvertToAbsolutePathForExternalAppForWrite (const TCHAR *Filename)
 Converts passed in filename to use an absolute path (for writing) 更多...
 
virtual bool CopyDirectoryTree (const TCHAR *DestinationDirectory, const TCHAR *Source, bool bOverwriteAllExisting)
 Copy a file or a hierarchy of files (directory). 更多...
 
virtual bool CopyFile (const TCHAR *To, const TCHAR *From, EPlatformFileRead ReadFlags=EPlatformFileRead::None, EPlatformFileWrite WriteFlags=EPlatformFileWrite::None)
 Copy a file. 更多...
 
virtual bool CreateDirectory (const TCHAR *Directory)=0
 Create a directory and return true if the directory was created or already existed.
 
virtual bool CreateDirectoryTree (const TCHAR *Directory)
 Create a directory, including any parent directories and return true if the directory was created or already existed.
 
virtual bool DeleteDirectory (const TCHAR *Directory)=0
 Delete a directory and return true if the directory was deleted or otherwise does not exist.
 
virtual bool DeleteDirectoryRecursively (const TCHAR *Directory)
 Delete all files and subdirectories in a directory, then delete the directory itself 更多...
 
virtual bool DeleteFile (const TCHAR *Filename)=0
 Delete a file and return true if the file exists. 更多...
 
virtual bool DirectoryExists (const TCHAR *Directory)=0
 Return true if the directory exists.
 
virtual bool DoesCreatePublicFiles ()
 Checks to see if this file system creates publicly accessible files 更多...
 
virtual bool FileExists (const TCHAR *Filename)=0
 Return true if the file exists.
 
virtual int64 FileSize (const TCHAR *Filename)=0
 Return the size of the file, or -1 if it doesn't exist.
 
virtual void FindFiles (TArray< FString > &FoundFiles, const TCHAR *Directory, const TCHAR *FileExtension)
 Finds all the files within the given directory, with optional file extension filter 更多...
 
virtual void FindFilesRecursively (TArray< FString > &FoundFiles, const TCHAR *Directory, const TCHAR *FileExtension)
 Finds all the files within the directory tree, with optional file extension filter 更多...
 
virtual FDateTime GetAccessTimeStamp (const TCHAR *Filename)=0
 Return the last access time of a file. 更多...
 
virtual FString GetFilenameOnDisk (const TCHAR *Filename)=0
 For case insensitive filesystems, returns the full path of the file with the same case as in the filesystem
 
virtual IPlatformFile * GetLowerLevel ()=0
 Gets the platform file wrapped by this file.
 
virtual const TCHAR * GetName () const =0
 Gets this platform file type name.
 
virtual FFileStatData GetStatData (const TCHAR *FilenameOrDirectory)=0
 Return the stat data for the given file or directory. 更多...
 
virtual FDateTime GetTimeStamp (const TCHAR *Filename)=0
 Return the modification time of a file. 更多...
 
virtual FDateTime GetTimeStampLocal (const TCHAR *Filename)
 Return the modification time of a file in the local time of the calling code (GetTimeStamp returns UTC). 更多...
 
virtual bool Initialize (IPlatformFile *Inner, const TCHAR *CmdLine)=0
 Initializes platform file. 更多...
 
virtual void InitializeAfterSetActive ()
 Performs initialization of the platform file after it has become the active (FPlatformFileManager.GetPlatformFile() will return this
 
virtual void InitializeNewAsyncIO ()
 Performs initialization of the platform file after the new async IO has been enabled
 
virtual bool IsReadOnly (const TCHAR *Filename)=0
 Return true if the file is read only.
 
virtual bool IsSandboxEnabled () const
 Returns whether the sandbox is enabled or not 更多...
 
virtual bool IterateDirectory (const TCHAR *Directory, FDirectoryVisitor &Visitor)=0
 Call the Visit function of the visitor once for each file or directory in a single directory. 更多...
 
virtual bool IterateDirectory (const TCHAR *Directory, FDirectoryVisitorFunc Visitor)
 Call the visitor once for each file or directory in a single directory. 更多...
 
virtual bool IterateDirectoryRecursively (const TCHAR *Directory, FDirectoryVisitor &Visitor)
 Call the Visit function of the visitor once for each file or directory in a directory tree. 更多...
 
virtual bool IterateDirectoryRecursively (const TCHAR *Directory, FDirectoryVisitorFunc Visitor)
 Call the Visit function of the visitor once for each file or directory in a directory tree. 更多...
 
virtual bool IterateDirectoryStat (const TCHAR *Directory, FDirectoryStatVisitor &Visitor)=0
 Call the Visit function of the visitor once for each file or directory in a single directory. 更多...
 
virtual bool IterateDirectoryStat (const TCHAR *Directory, FDirectoryStatVisitorFunc Visitor)
 Call the visitor once for each file or directory in a single directory. 更多...
 
virtual bool IterateDirectoryStatRecursively (const TCHAR *Directory, FDirectoryStatVisitor &Visitor)
 Call the Visit function of the visitor once for each file or directory in a directory tree. 更多...
 
virtual bool IterateDirectoryStatRecursively (const TCHAR *Directory, FDirectoryStatVisitorFunc Visitor)
 Call the Visit function of the visitor once for each file or directory in a directory tree. 更多...
 
virtual void MakeUniquePakFilesForTheseFiles (const TArray< TArray< FString > > &InFiles)
 Build an in memory unique pak file from a subset of files in this pak file
 
virtual bool MoveFile (const TCHAR *To, const TCHAR *From)=0
 Attempt to move a file. 更多...
 
virtual IAsyncReadFileHandle * OpenAsyncRead (const TCHAR *Filename)
 Open a file for async reading. 更多...
 
virtual IMappedFileHandle * OpenMapped (const TCHAR *Filename)
 Open a file for async reading. 更多...
 
virtual IFileHandle * OpenRead (const TCHAR *Filename, bool bAllowWrite=false)=0
 Attempt to open a file for reading. 更多...
 
virtual IFileHandle * OpenWrite (const TCHAR *Filename, bool bAppend=false, bool bAllowRead=false)=0
 Attempt to open a file for writing. 更多...
 
virtual bool SendMessageToServer (const TCHAR *Message, IFileServerMessageHandler *Handler)
 Sends a message to the file server, and will block until it's complete. 更多...
 
virtual void SetAsyncMinimumPriority (EAsyncIOPriorityAndFlags MinPriority)
 Controls if the pak precacher should process precache requests. 更多...
 
virtual void SetCreatePublicFiles (bool bCreatePublicFiles)
 Sets file system to create publicly accessible files or not 更多...
 
virtual void SetLowerLevel (IPlatformFile *NewLowerLevel)=0
 Sets the platform file wrapped by this file.
 
virtual bool SetReadOnly (const TCHAR *Filename, bool bNewReadOnlyValue)=0
 Attempt to change the read only status of a file. 更多...
 
virtual void SetSandboxEnabled (bool bInEnabled)
 Set whether the sandbox is enabled or not 更多...
 
virtual void SetTimeStamp (const TCHAR *Filename, FDateTime DateTime)=0
 Sets the modification time of a file
 
virtual bool ShouldBeUsed (IPlatformFile *Inner, const TCHAR *CmdLine) const
 Checks if this platform file should be used even though it was not asked to be. 更多...
 
virtual void Tick ()
 Platform file can override this to get a regular tick from the engine
 
virtual ~IPlatformFile ()
 Destructor.
 

静态 Public 成员函数

static bool CheckIfPakFilesExist (IPlatformFile *LowLevelFile, const TArray< FString > &PakFolders)
 Checks if pak files exist in any of the known pak file locations.
 
static bool FindFileInPakFiles (TArray< FPakListEntry > &Paks, const TCHAR *Filename, FPakFile **OutPakFile, FPakEntry *OutEntry=nullptr)
 Finds a file in the specified pak files. 更多...
 
static const TCHAR * GetMountStartupPaksWildCard ()
 Get the wild card pattern used to identify paks to load on startup
 
static void GetPakEncryptionKey (FAES::FAESKey &OutKey, const FGuid &InEncryptionKeyGuid)
 Helper function for accessing pak encryption key
 
static void GetPakFolders (const TCHAR *CmdLine, TArray< FString > &OutPakFolders)
 Gets all pak file locations.
 
static TSharedPtr< const struct FPakSignatureFile, ESPMode::ThreadSafe > GetPakSignatureFile (const TCHAR *InFilename)
 Load a pak signature file. 更多...
 
static const TCHAR * GetTypeName ()
 Get the unique name for the pak platform file layer
 
static void RemoveCachedPakSignaturesFile (const TCHAR *InFilename)
 Remove the intenrally cached pointer to the signature file for the specified pak
 
static void SetMountStartupPaksWildCard (const FString &WildCard)
 Overrides the wildcard used for searching paks. 更多...
 
- 静态 Public 成员函数 继承自 IPlatformFile
static const TCHAR * GetPhysicalTypeName ()
 Returns the name of the physical platform file type.
 
static IPlatformFile & GetPlatformPhysical ()
 Physical file system of the platform, never wrapped.
 

额外继承的成员函数

- Public 类型 继承自 IPlatformFile
typedef TFunctionRef< bool(const TCHAR *, const FFileStatData &)> FDirectoryStatVisitorFunc
 File and directory visitor function that takes all the stat data
 
typedef TFunctionRef< bool(const TCHAR *, bool)> FDirectoryVisitorFunc
 File and directory visitor function that takes only the name
 

详细描述

Platform file wrapper to be able to use pak files.

构造及析构函数说明

◆ FPakPlatformFile()

FPakPlatformFile::FPakPlatformFile ( )

Constructor.

参数
InLowerLevelWrapper platform file.

成员函数说明

◆ ConvertToAbsolutePathForExternalAppForRead()

FString FPakPlatformFile::ConvertToAbsolutePathForExternalAppForRead ( const TCHAR *  Filename)
inlineoverridevirtual

Converts passed in filename to use an absolute path (for reading).

参数
Filenamefilename to convert to use an absolute path, safe to pass in already using absolute path
返回
filename using absolute path

重载 IPlatformFile .

◆ ConvertToAbsolutePathForExternalAppForWrite()

FString FPakPlatformFile::ConvertToAbsolutePathForExternalAppForWrite ( const TCHAR *  Filename)
inlineoverridevirtual

Converts passed in filename to use an absolute path (for writing)

参数
Filenamefilename to convert to use an absolute path, safe to pass in already using absolute path
返回
filename using absolute path

重载 IPlatformFile .

◆ ConvertToPakRelativePath()

FString FPakPlatformFile::ConvertToPakRelativePath ( const TCHAR *  Filename,
const FPakFile *  Pak 
)
inline

Converts a filename to a path inside pak file.

参数
FilenameFilename to convert.
PakPak to convert the filename realative to.
Relativefilename.

◆ CopyFile()

virtual bool FPakPlatformFile::CopyFile ( const TCHAR *  To,
const TCHAR *  From,
EPlatformFileRead  ReadFlags = EPlatformFileRead::None,
EPlatformFileWrite  WriteFlags = EPlatformFileWrite::None 
)
overridevirtual

Copy a file.

This will fail if the destination file already exists.

参数
ToFile to copy to.
FromFile to copy from.
ReadFlagsSource file read options.
WriteFlagsDestination file write options.
返回
true if the file was copied sucessfully.

重载 IPlatformFile .

◆ DeleteDirectoryRecursively()

virtual bool FPakPlatformFile::DeleteDirectoryRecursively ( const TCHAR *  Directory)
inlineoverridevirtual

Delete all files and subdirectories in a directory, then delete the directory itself

参数
DirectoryThe directory to delete.
返回
true if the directory was deleted or did not exist.

重载 IPlatformFile .

◆ DeleteFile()

virtual bool FPakPlatformFile::DeleteFile ( const TCHAR *  Filename)
inlineoverridevirtual

Delete a file and return true if the file exists.

Will not delete read only files.

实现了 IPlatformFile.

◆ FindFileInPakFiles() [1/2]

bool FPakPlatformFile::FindFileInPakFiles ( const TCHAR *  Filename,
FPakFile **  OutPakFile = nullptr,
FPakEntry *  OutEntry = nullptr 
)
inline

Finds a file in all available pak files.

参数
FilenameFile to find in pak files.
OutPakFileOptional pointer to a pak file where the filename was found.
返回
Pointer to pak entry if the file was found, NULL otherwise.

◆ FindFileInPakFiles() [2/2]

static bool FPakPlatformFile::FindFileInPakFiles ( TArray< FPakListEntry > &  Paks,
const TCHAR *  Filename,
FPakFile **  OutPakFile,
FPakEntry *  OutEntry = nullptr 
)
inlinestatic

Finds a file in the specified pak files.

参数
PaksPak files to find the file in.
FilenameFile to find in pak files.
OutPakFileOptional pointer to a pak file where the filename was found.
返回
Pointer to pak entry if the file was found, NULL otherwise.

◆ FindFiles()

virtual void FPakPlatformFile::FindFiles ( TArray< FString > &  FoundFiles,
const TCHAR *  Directory,
const TCHAR *  FileExtension 
)
inlineoverridevirtual

Finds all the files within the given directory, with optional file extension filter

参数
DirectoryThe directory to iterate the contents of
FileExtensionIf FileExtension is NULL, or an empty string "" then all files are found. Otherwise FileExtension can be of the form .EXT or just EXT and only files with that extension will be returned.
返回
FoundFiles All the files that matched the optional FileExtension filter, or all files if none was specified.

重载 IPlatformFile .

◆ FindFilesRecursively()

virtual void FPakPlatformFile::FindFilesRecursively ( TArray< FString > &  FoundFiles,
const TCHAR *  Directory,
const TCHAR *  FileExtension 
)
inlineoverridevirtual

Finds all the files within the directory tree, with optional file extension filter

参数
DirectoryThe starting directory to iterate the contents. This function explores subdirectories
FileExtensionIf FileExtension is NULL, or an empty string "" then all files are found. Otherwise FileExtension can be of the form .EXT or just EXT and only files with that extension will be returned.
返回
FoundFiles All the files that matched the optional FileExtension filter, or all files if none was specified.

重载 IPlatformFile .

◆ GetAccessTimeStamp()

virtual FDateTime FPakPlatformFile::GetAccessTimeStamp ( const TCHAR *  Filename)
inlineoverridevirtual

Return the last access time of a file.

Returns FDateTime::MinValue() on failure

实现了 IPlatformFile.

◆ GetPakChunkLocation()

EChunkLocation::Type FPakPlatformFile::GetPakChunkLocation ( int32  InPakchunkIndex) const

Determine location information for a given pakchunk index.

Will be DoesNotExist if the pak file wasn't detected, NotAvailable if it exists but hasn't been mounted due to a missing encryption key, or LocalFast if it exists and has been mounted

◆ GetPakSignatureFile()

static TSharedPtr< const struct FPakSignatureFile, ESPMode::ThreadSafe > FPakPlatformFile::GetPakSignatureFile ( const TCHAR *  InFilename)
static

Load a pak signature file.

Validates the contents by comparing a SHA hash of the chunk table against and encrypted version that is stored within the file. Returns nullptr if the data is missing or fails the signature check. This function also calls the generic pak signature failure delegates if anything is wrong.

◆ GetStatData()

virtual FFileStatData FPakPlatformFile::GetStatData ( const TCHAR *  FilenameOrDirectory)
inlineoverridevirtual

Return the stat data for the given file or directory.

Check the FFileStatData::bIsValid member before using the returned data

实现了 IPlatformFile.

◆ GetTimeStamp()

virtual FDateTime FPakPlatformFile::GetTimeStamp ( const TCHAR *  Filename)
inlineoverridevirtual

Return the modification time of a file.

Returns FDateTime::MinValue() on failure

实现了 IPlatformFile.

◆ Initialize()

virtual bool FPakPlatformFile::Initialize ( IPlatformFile *  Inner,
const TCHAR *  CmdLine 
)
overridevirtual

Initializes platform file.

参数
InnerPlatform file to wrap by this file.
CmdLineCommand line to parse.
返回
true if the initialization was successful, false otherise.

实现了 IPlatformFile.

◆ IterateDirectory() [1/3]

virtual bool IPlatformFile::IterateDirectory ( const TCHAR *  Directory,
FDirectoryVisitor &  Visitor 
)
virtual

Call the Visit function of the visitor once for each file or directory in a single directory.

This function does not explore subdirectories.

参数
DirectoryThe directory to iterate the contents of.
VisitorVisitor to call for each element of the directory
返回
false if the directory did not exist or if the visitor returned false.

实现了 IPlatformFile.

◆ IterateDirectory() [2/3]

virtual bool IPlatformFile::IterateDirectory ( const TCHAR *  Directory,
FDirectoryVisitorFunc  Visitor 
)
virtual

Call the visitor once for each file or directory in a single directory.

This function does not explore subdirectories.

参数
DirectoryThe directory to iterate the contents of.
VisitorVisitor to call for each element of the directory (see FDirectoryVisitor::Visit for the signature)
返回
false if the directory did not exist or if the visitor returned false.

重载 IPlatformFile .

◆ IterateDirectory() [3/3]

virtual bool FPakPlatformFile::IterateDirectory ( const TCHAR *  Directory,
IPlatformFile::FDirectoryVisitor &  Visitor 
)
inlineoverridevirtual

Call the Visit function of the visitor once for each file or directory in a single directory.

This function does not explore subdirectories.

参数
DirectoryThe directory to iterate the contents of.
VisitorVisitor to call for each element of the directory
返回
false if the directory did not exist or if the visitor returned false.

实现了 IPlatformFile.

◆ IterateDirectoryRecursively() [1/3]

virtual bool IPlatformFile::IterateDirectoryRecursively ( const TCHAR *  Directory,
FDirectoryVisitor &  Visitor 
)
virtual

Call the Visit function of the visitor once for each file or directory in a directory tree.

This function explores subdirectories.

参数
DirectoryThe directory to iterate the contents of, recursively.
VisitorVisitor to call for each element of the directory and each element of all subdirectories.
返回
false if the directory did not exist or if the visitor returned false.

重载 IPlatformFile .

◆ IterateDirectoryRecursively() [2/3]

virtual bool IPlatformFile::IterateDirectoryRecursively ( const TCHAR *  Directory,
FDirectoryVisitorFunc  Visitor 
)
virtual

Call the Visit function of the visitor once for each file or directory in a directory tree.

This function explores subdirectories.

参数
DirectoryThe directory to iterate the contents of, recursively.
VisitorVisitor to call for each element of the directory and each element of all subdirectories (see FDirectoryVisitor::Visit for the signature).
返回
false if the directory did not exist or if the visitor returned false.

重载 IPlatformFile .

◆ IterateDirectoryRecursively() [3/3]

virtual bool FPakPlatformFile::IterateDirectoryRecursively ( const TCHAR *  Directory,
IPlatformFile::FDirectoryVisitor &  Visitor 
)
inlineoverridevirtual

Call the Visit function of the visitor once for each file or directory in a directory tree.

This function explores subdirectories.

参数
DirectoryThe directory to iterate the contents of, recursively.
VisitorVisitor to call for each element of the directory and each element of all subdirectories.
返回
false if the directory did not exist or if the visitor returned false.

重载 IPlatformFile .

◆ IterateDirectoryStat() [1/3]

virtual bool IPlatformFile::IterateDirectoryStat ( const TCHAR *  Directory,
FDirectoryStatVisitor &  Visitor 
)
virtual

Call the Visit function of the visitor once for each file or directory in a single directory.

This function does not explore subdirectories.

参数
DirectoryThe directory to iterate the contents of.
VisitorVisitor to call for each element of the directory
返回
false if the directory did not exist or if the visitor returned false.

实现了 IPlatformFile.

◆ IterateDirectoryStat() [2/3]

virtual bool IPlatformFile::IterateDirectoryStat ( const TCHAR *  Directory,
FDirectoryStatVisitorFunc  Visitor 
)
virtual

Call the visitor once for each file or directory in a single directory.

This function does not explore subdirectories.

参数
DirectoryThe directory to iterate the contents of.
VisitorVisitor to call for each element of the directory (see FDirectoryStatVisitor::Visit for the signature)
返回
false if the directory did not exist or if the visitor returned false.

重载 IPlatformFile .

◆ IterateDirectoryStat() [3/3]

virtual bool FPakPlatformFile::IterateDirectoryStat ( const TCHAR *  Directory,
IPlatformFile::FDirectoryStatVisitor &  Visitor 
)
inlineoverridevirtual

Call the Visit function of the visitor once for each file or directory in a single directory.

This function does not explore subdirectories.

参数
DirectoryThe directory to iterate the contents of.
VisitorVisitor to call for each element of the directory
返回
false if the directory did not exist or if the visitor returned false.

实现了 IPlatformFile.

◆ IterateDirectoryStatRecursively() [1/3]

virtual bool IPlatformFile::IterateDirectoryStatRecursively ( const TCHAR *  Directory,
FDirectoryStatVisitor &  Visitor 
)
virtual

Call the Visit function of the visitor once for each file or directory in a directory tree.

This function explores subdirectories.

参数
DirectoryThe directory to iterate the contents of, recursively.
VisitorVisitor to call for each element of the directory and each element of all subdirectories.
返回
false if the directory did not exist or if the visitor returned false.

重载 IPlatformFile .

◆ IterateDirectoryStatRecursively() [2/3]

virtual bool IPlatformFile::IterateDirectoryStatRecursively ( const TCHAR *  Directory,
FDirectoryStatVisitorFunc  Visitor 
)
virtual

Call the Visit function of the visitor once for each file or directory in a directory tree.

This function explores subdirectories.

参数
DirectoryThe directory to iterate the contents of, recursively.
VisitorVisitor to call for each element of the directory and each element of all subdirectories (see FDirectoryStatVisitor::Visit for the signature).
返回
false if the directory did not exist or if the visitor returned false.

重载 IPlatformFile .

◆ IterateDirectoryStatRecursively() [3/3]

virtual bool FPakPlatformFile::IterateDirectoryStatRecursively ( const TCHAR *  Directory,
IPlatformFile::FDirectoryStatVisitor &  Visitor 
)
inlineoverridevirtual

Call the Visit function of the visitor once for each file or directory in a directory tree.

This function explores subdirectories.

参数
DirectoryThe directory to iterate the contents of, recursively.
VisitorVisitor to call for each element of the directory and each element of all subdirectories.
返回
false if the directory did not exist or if the visitor returned false.

重载 IPlatformFile .

◆ Mount()

bool FPakPlatformFile::Mount ( const TCHAR *  InPakFilename,
uint32  PakOrder,
const TCHAR *  InPath = NULL,
bool  bLoadIndex = true 
)

Mounts a pak file at the specified path.

参数
InPakFilenamePak filename.
InPathPath to mount the pak at.

◆ MoveFile()

virtual bool FPakPlatformFile::MoveFile ( const TCHAR *  To,
const TCHAR *  From 
)
inlineoverridevirtual

Attempt to move a file.

Return true if successful. Will not overwrite existing files.

实现了 IPlatformFile.

◆ OpenAsyncRead()

virtual IAsyncReadFileHandle * FPakPlatformFile::OpenAsyncRead ( const TCHAR *  Filename)
overridevirtual

Open a file for async reading.

This call does not hit the disk or block.

参数
Filenamefile to be opened
返回
Close the file by delete'ing the handle. A non-null return value does not mean the file exists, since that may not be determined yet.

重载 IPlatformFile .

◆ OpenMapped()

virtual IMappedFileHandle * FPakPlatformFile::OpenMapped ( const TCHAR *  Filename)
overridevirtual

Open a file for async reading.

This call does hit the disk; it is synchronous open.

参数
Filenamefile to be mapped. This doesn't actually map anything, just opens the file.
返回
Close the file by delete'ing the handle. A non-null return value does mean the file exists. Null can be returned for many reasons even if the file exists. Perhaps this platform does not support mapped files, or this file is compressed in a pak file. Generally you attempt to open mapped, and if that fails, then use other file operations instead.

重载 IPlatformFile .

◆ OpenRead()

virtual IFileHandle * FPakPlatformFile::OpenRead ( const TCHAR *  Filename,
bool  bAllowWrite = false 
)
overridevirtual

Attempt to open a file for reading.

参数
Filenamefile to be opened
bAllowWrite(applies to certain platforms only) whether this file is allowed to be written to by other processes. This flag is needed to open files that are currently being written to as well.
返回
If successful will return a non-nullptr pointer. Close the file by delete'ing the handle.

实现了 IPlatformFile.

◆ OpenWrite()

virtual IFileHandle * FPakPlatformFile::OpenWrite ( const TCHAR *  Filename,
bool  bAppend = false,
bool  bAllowRead = false 
)
inlineoverridevirtual

Attempt to open a file for writing.

If successful will return a non-nullptr pointer. Close the file by delete'ing the handle.

实现了 IPlatformFile.

◆ SetAsyncMinimumPriority()

virtual void FPakPlatformFile::SetAsyncMinimumPriority ( EAsyncIOPriorityAndFlags  MinPriority)
overridevirtual

Controls if the pak precacher should process precache requests.

Requests below this threshold will not get precached. Without this throttle, quite a lot of memory can be consumed if the disk races ahead of the CPU.

参数
MinPrioritythe minimum priority at which requests will get precached

重载 IPlatformFile .

◆ SetMountStartupPaksWildCard()

static void FPakPlatformFile::SetMountStartupPaksWildCard ( const FString &  WildCard)
static

Overrides the wildcard used for searching paks.

Call before initialization

◆ SetReadOnly()

virtual bool FPakPlatformFile::SetReadOnly ( const TCHAR *  Filename,
bool  bNewReadOnlyValue 
)
inlineoverridevirtual

Attempt to change the read only status of a file.

Return true if successful.

实现了 IPlatformFile.

◆ ShouldBeUsed()

virtual bool FPakPlatformFile::ShouldBeUsed ( IPlatformFile *  Inner,
const TCHAR *  CmdLine 
) const
overridevirtual

Checks if this platform file should be used even though it was not asked to be.

i.e. pak files exist on disk so we should use a pak file

重载 IPlatformFile .


该类的文档由以下文件生成: