UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FCachedReadPlatformFile Class Reference

#include <IPlatformFileCachedWrapper.h>

+ Inheritance diagram for FCachedReadPlatformFile:

Public Member Functions

 FCachedReadPlatformFile ()
 
virtual bool Initialize (IPlatformFile *Inner, const TCHAR *CommandLineParam) override
 
virtual bool ShouldBeUsed (IPlatformFile *Inner, const TCHAR *CmdLine) const override
 
IPlatformFileGetLowerLevel () override
 
virtual void SetLowerLevel (IPlatformFile *NewLowerLevel) override
 
virtual const TCHARGetName () const override
 
virtual bool FileExists (const TCHAR *Filename) override
 
virtual int64 FileSize (const TCHAR *Filename) override
 
virtual bool DeleteFile (const TCHAR *Filename) override
 
virtual bool IsReadOnly (const TCHAR *Filename) override
 
virtual bool MoveFile (const TCHAR *To, const TCHAR *From) override
 
virtual bool SetReadOnly (const TCHAR *Filename, bool bNewReadOnlyValue) override
 
virtual FDateTime GetTimeStamp (const TCHAR *Filename) override
 
virtual void SetTimeStamp (const TCHAR *Filename, FDateTime DateTime) override
 
virtual FDateTime GetAccessTimeStamp (const TCHAR *Filename) override
 
virtual FString GetFilenameOnDisk (const TCHAR *Filename) override
 
virtual IFileHandleOpenRead (const TCHAR *Filename, bool bAllowWrite) override
 
virtual IFileHandleOpenWrite (const TCHAR *Filename, bool bAppend=false, bool bAllowRead=false) override
 
virtual bool DirectoryExists (const TCHAR *Directory) override
 
virtual bool CreateDirectory (const TCHAR *Directory) override
 
virtual bool DeleteDirectory (const TCHAR *Directory) override
 
virtual FFileStatData GetStatData (const TCHAR *FilenameOrDirectory) override
 
virtual bool IterateDirectory (const TCHAR *Directory, IPlatformFile::FDirectoryVisitor &Visitor) override
 
virtual bool IterateDirectoryRecursively (const TCHAR *Directory, IPlatformFile::FDirectoryVisitor &Visitor) override
 
virtual bool IterateDirectoryStat (const TCHAR *Directory, IPlatformFile::FDirectoryStatVisitor &Visitor) override
 
virtual bool IterateDirectoryStatRecursively (const TCHAR *Directory, IPlatformFile::FDirectoryStatVisitor &Visitor) override
 
virtual void FindFiles (TArray< FString > &FoundFiles, const TCHAR *Directory, const TCHAR *FileExtension)
 
virtual void FindFilesRecursively (TArray< FString > &FoundFiles, const TCHAR *Directory, const TCHAR *FileExtension)
 
virtual bool DeleteDirectoryRecursively (const TCHAR *Directory) override
 
virtual bool CopyFile (const TCHAR *To, const TCHAR *From, EPlatformFileRead ReadFlags=EPlatformFileRead::None, EPlatformFileWrite WriteFlags=EPlatformFileWrite::None) override
 
virtual bool CreateDirectoryTree (const TCHAR *Directory) override
 
virtual bool CopyDirectoryTree (const TCHAR *DestinationDirectory, const TCHAR *Source, bool bOverwriteAllExisting) override
 
virtual FString ConvertToAbsolutePathForExternalAppForRead (const TCHAR *Filename) override
 
virtual FString ConvertToAbsolutePathForExternalAppForWrite (const TCHAR *Filename) override
 
virtual bool SendMessageToServer (const TCHAR *Message, IFileServerMessageHandler *Handler) override
 
virtual IAsyncReadFileHandleOpenAsyncRead (const TCHAR *Filename, bool bAllowWrite=false) override
 
virtual FOpenMappedResult OpenMappedEx (const TCHAR *Filename, EOpenReadFlags OpenOptions=EOpenReadFlags::None, int64 MaximumSize=0) override
 
virtual void SetAsyncMinimumPriority (EAsyncIOPriorityAndFlags MinPriority) override
 
virtual bool FileJournalIsAvailable (const TCHAR *VolumeOrPath=nullptr, ELogVerbosity::Type *OutErrorLevel=nullptr, FString *OutError=nullptr) override
 
virtual bool FileJournalIterateDirectory (const TCHAR *Directory, FDirectoryJournalVisitorFunc Visitor, FString *OutError=nullptr) override
 
virtual EFileJournalResult FileJournalGetLatestEntry (const TCHAR *VolumeName, FFileJournalId &OutJournalId, FFileJournalEntryHandle &OutEntryHandle, FString *OutError=nullptr) override
 
virtual EFileJournalResult FileJournalReadModified (const TCHAR *VolumeName, const FFileJournalId &JournalIdOfStartingEntry, const FFileJournalEntryHandle &StartingJournalEntry, TMap< FFileJournalFileHandle, FString > &KnownDirectories, TSet< FString > &OutModifiedDirectories, FFileJournalEntryHandle &OutNextJournalEntry, FString *OutError=nullptr) override
 
virtual FFileJournalData FileJournalGetFileData (const TCHAR *FilenameOrDirectory, FString *OutError=nullptr) override
 
virtual FString FileJournalGetVolumeName (FStringView InPath) override
 
virtual uint64 FileJournalGetMaximumSize (const TCHAR *VolumeOrPath=nullptr, ELogVerbosity::Type *OutErrorLevel=nullptr, FString *OutError=nullptr) const override
 
virtual bool IterateDirectory (const TCHAR *Directory, FDirectoryVisitor &Visitor)=0
 
virtual CORE_API bool IterateDirectory (const TCHAR *Directory, FDirectoryVisitorFunc Visitor)
 
virtual CORE_API bool IterateDirectoryRecursively (const TCHAR *Directory, FDirectoryVisitor &Visitor)
 
virtual CORE_API bool IterateDirectoryRecursively (const TCHAR *Directory, FDirectoryVisitorFunc Visitor)
 
virtual bool IterateDirectoryStat (const TCHAR *Directory, FDirectoryStatVisitor &Visitor)=0
 
virtual CORE_API bool IterateDirectoryStat (const TCHAR *Directory, FDirectoryStatVisitorFunc Visitor)
 
virtual CORE_API bool IterateDirectoryStatRecursively (const TCHAR *Directory, FDirectoryStatVisitor &Visitor)
 
virtual CORE_API bool IterateDirectoryStatRecursively (const TCHAR *Directory, FDirectoryStatVisitorFunc Visitor)
 
- Public Member Functions inherited from IPlatformFile
CORE_API IPlatformFile ()
 
virtual CORE_API ~IPlatformFile ()
 
virtual void SetSandboxEnabled (bool bInEnabled)
 
virtual bool IsSandboxEnabled () const
 
virtual void InitializeAfterSetActive ()
 
virtual void InitializeAfterProjectFilePath ()
 
virtual void MakeUniquePakFilesForTheseFiles (const TArray< TArray< FString > > &InFiles)
 
virtual void InitializeNewAsyncIO ()
 
virtual void AddLocalDirectories (TArray< FString > &LocalDirectories)
 
virtual void BypassSecurity (bool bInBypass)
 
virtual void Tick ()
 
virtual bool DeleteFiles (const TArrayView< const TCHAR * > &Filenames)
 
virtual ESymlinkResult IsSymlink (const TCHAR *Filename)
 
virtual bool HasMarkOfTheWeb (FStringView Filename, FString *OutSourceURL=nullptr)
 
virtual bool SetMarkOfTheWeb (FStringView Filename, bool bNewStatus, const FString *InSourceURL=nullptr)
 
virtual CORE_API FFileOpenResult OpenRead (const TCHAR *Filename, EOpenReadFlags Flags)
 
virtual FFileOpenResult OpenReadNoBuffering (const TCHAR *Filename, EOpenReadFlags Flags)
 
virtual IFileHandleOpenReadNoBuffering (const TCHAR *Filename, bool bAllowWrite=false)
 
virtual CORE_API FFileOpenResult OpenWrite (const TCHAR *Filename, EOpenWriteFlags Flags)
 
virtual CORE_API FFileOpenAsyncResult OpenAsyncRead (const TCHAR *Filename, EOpenReadFlags Flags)
 
virtual CORE_API IMappedFileHandleOpenMapped (const TCHAR *Filename)
 
virtual CORE_API void GetTimeStampPair (const TCHAR *PathA, const TCHAR *PathB, FDateTime &OutTimeStampA, FDateTime &OutTimeStampB)
 
virtual CORE_API FDateTime GetTimeStampLocal (const TCHAR *Filename)
 
virtual bool DoesCreatePublicFiles ()
 
virtual void SetCreatePublicFiles (bool bCreatePublicFiles)
 
virtual int64 GetAllowedBytesToWriteThrottledStorage (const TCHAR *DestinationPath=nullptr)
 

Static Public Member Functions

static const TCHARGetTypeName ()
 
- Static Public Member Functions inherited from IPlatformFile
static CORE_API IPlatformFileGetPlatformPhysical ()
 
static CORE_API const TCHARGetPhysicalTypeName ()
 

Additional Inherited Members

- Public Types inherited from IPlatformFile
enum class  EOpenReadFlags : uint8 { None = 0 , AllowWrite = 1 << 0 , AllowDelete = 1 << 1 , NoBuffering = 1 << 2 }
 
enum class  EOpenWriteFlags : uint8 { None = 0 , AllowRead = 1 << 0 , Append = 1 << 1 }
 
typedef TFunctionRef< bool(const TCHAR *, bool)> FDirectoryVisitorFunc
 
typedef TFunctionRef< bool(const TCHAR *, const FFileStatData &)> FDirectoryStatVisitorFunc
 
typedef TFunctionRef< bool(const TCHAR *, const FFileJournalData &)> FDirectoryJournalVisitorFunc
 

Constructor & Destructor Documentation

◆ FCachedReadPlatformFile()

FCachedReadPlatformFile::FCachedReadPlatformFile ( )
inline

Member Function Documentation

◆ ConvertToAbsolutePathForExternalAppForRead()

virtual FString FCachedReadPlatformFile::ConvertToAbsolutePathForExternalAppForRead ( const TCHAR Filename)
inlineoverridevirtual

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

Parameters
Filenamefilename to convert to use an absolute path, safe to pass in already using absolute path
Returns
filename using absolute path

Reimplemented from IPlatformFile.

◆ ConvertToAbsolutePathForExternalAppForWrite()

virtual FString FCachedReadPlatformFile::ConvertToAbsolutePathForExternalAppForWrite ( const TCHAR Filename)
inlineoverridevirtual

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

Parameters
Filenamefilename to convert to use an absolute path, safe to pass in already using absolute path
Returns
filename using absolute path

Reimplemented from IPlatformFile.

◆ CopyDirectoryTree()

virtual bool FCachedReadPlatformFile::CopyDirectoryTree ( const TCHAR DestinationDirectory,
const TCHAR Source,
bool  bOverwriteAllExisting 
)
inlineoverridevirtual

Copy a file or a hierarchy of files (directory).

Parameters
DestinationDirectoryTarget path (either absolute or relative) to copy to - always a directory! (e.g. "/home/dest/").
SourceSource file (or directory) to copy (e.g. "/home/source/stuff").
bOverwriteAllExistingWhether to overwrite everything that exists at target
Returns
true if operation completed successfully.

Reimplemented from IPlatformFile.

◆ CopyFile()

virtual bool FCachedReadPlatformFile::CopyFile ( const TCHAR To,
const TCHAR From,
EPlatformFileRead  ReadFlags = EPlatformFileRead::None,
EPlatformFileWrite  WriteFlags = EPlatformFileWrite::None 
)
inlineoverridevirtual

Copy a file. This will fail if the destination file already exists.

Parameters
ToFile to copy to.
FromFile to copy from.
ReadFlagsSource file read options.
WriteFlagsDestination file write options.
Returns
true if the file was copied successfully.

Reimplemented from IPlatformFile.

◆ CreateDirectory()

virtual bool FCachedReadPlatformFile::CreateDirectory ( const TCHAR Directory)
inlineoverridevirtual

Create a directory and return true if the directory was created or already existed.

Implements IPlatformFile.

◆ CreateDirectoryTree()

virtual bool FCachedReadPlatformFile::CreateDirectoryTree ( const TCHAR Directory)
inlineoverridevirtual

Create a directory, including any parent directories and return true if the directory was created or already existed.

Reimplemented from IPlatformFile.

◆ DeleteDirectory()

virtual bool FCachedReadPlatformFile::DeleteDirectory ( const TCHAR Directory)
inlineoverridevirtual

Delete a directory and return true if the directory was deleted or otherwise does not exist.

Implements IPlatformFile.

◆ DeleteDirectoryRecursively()

virtual bool FCachedReadPlatformFile::DeleteDirectoryRecursively ( const TCHAR Directory)
inlineoverridevirtual

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

Parameters
DirectoryThe directory to delete.
Returns
true if the directory was deleted or did not exist.

Reimplemented from IPlatformFile.

◆ DeleteFile()

virtual bool FCachedReadPlatformFile::DeleteFile ( const TCHAR Filename)
inlineoverridevirtual

Delete a file and return true if the file exists. Will not delete read only files.

Implements IPlatformFile.

◆ DirectoryExists()

virtual bool FCachedReadPlatformFile::DirectoryExists ( const TCHAR Directory)
inlineoverridevirtual

Return true if the directory exists.

Implements IPlatformFile.

◆ FileExists()

virtual bool FCachedReadPlatformFile::FileExists ( const TCHAR Filename)
inlineoverridevirtual

Return true if the file exists.

Implements IPlatformFile.

◆ FileJournalGetFileData()

virtual FFileJournalData FCachedReadPlatformFile::FileJournalGetFileData ( const TCHAR FilenameOrDirectory,
FString *  OutError = nullptr 
)
inlineoverridevirtual

Return the data for the given path as with GetStatData, but report a FFileJournalData instead, which notably includes the FFileJournalFileHandle for the file/directory. Check the FFileJournalData::bIsValid member before using the returned data

Reimplemented from IPlatformFile.

◆ FileJournalGetLatestEntry()

virtual EFileJournalResult FCachedReadPlatformFile::FileJournalGetLatestEntry ( const TCHAR VolumeName,
FFileJournalId OutJournalId,
FFileJournalEntryHandle OutEntryHandle,
FString *  OutError = nullptr 
)
inlineoverridevirtual

Report the current end of the journal for the given volume, to be used as the StartingJournalEntry in FileJournalGetModifiedDirectories. If !FileJournalIsAvaiable for the given volume, sets OutEntryHandle to FileJournalEntryHandleInvalid. Returns EFileJournalResult::Success if successful, otherwise an error code and optionally a user-displayable explanation for the error code.

Reimplemented from IPlatformFile.

◆ FileJournalGetMaximumSize()

virtual uint64 FCachedReadPlatformFile::FileJournalGetMaximumSize ( const TCHAR VolumeOrPath = nullptr,
ELogVerbosity::Type OutErrorLevel = nullptr,
FString *  OutError = nullptr 
) const
inlineoverridevirtual

Return the maximum size of the FileJournal for the specified VolumeName, if available, zero otherwise. Optionally returns a user-displayable string for why the journal is not available and a severity level for the reason. VolumeName may be a VolumeName as returned by FileJournalGetVolumeName or any path to a file or directory on the Volume.

Reimplemented from IPlatformFile.

◆ FileJournalGetVolumeName()

virtual FString FCachedReadPlatformFile::FileJournalGetVolumeName ( FStringView  InPath)
inlineoverridevirtual

Return the VolumeSpecifier present in the given path. Returns empty string if path does not have a valid volume specifier for use by the FileJournal (e.g. some platforms do not support \paths for FileJournal).

See also
FPathViews::SplitVolumeSpecifier for a more general function that can return specifiers not usable by the FileJournal.

Reimplemented from IPlatformFile.

◆ FileJournalIsAvailable()

virtual bool FCachedReadPlatformFile::FileJournalIsAvailable ( const TCHAR VolumeOrPath = nullptr,
ELogVerbosity::Type OutErrorLevel = nullptr,
FString *  OutError = nullptr 
)
inlineoverridevirtual

Return whether FileJournal functionality is available on the current platform if VolumeName is nullptr or for the given Volume if VolumeName is non-null. Optionally returns a user-displayable string for why it is not available and a severity level for the reason. VolumeName may be a VolumeName as returned by FileJournalGetVolumeName or any path to a file or directory on the Volume.

Reimplemented from IPlatformFile.

◆ FileJournalIterateDirectory()

virtual bool FCachedReadPlatformFile::FileJournalIterateDirectory ( const TCHAR Directory,
FDirectoryJournalVisitorFunc  Visitor,
FString *  OutError = nullptr 
)
inlineoverridevirtual

Iterate the given directory as with IterateDirectoryStat, but report a FFileJournalData for each file and directory, which notably includes the FFileJournalFileHandle for the file/directory.

The paths returned as the first argument of the visitor function are the combined paths produced by combining the input directory with the relative path of the child file or directory.

If the FileJournal is unavailable on the current system the iteration will still succeed but the FFileJournalFileHandle for each child path will be set to FileJournalFileHandleInvalid.

If the FileJournal is available on the current system but not on the volume of the given directory, it is arbitrary whether the FFileJournalFileHandle will be validly set; if not valid they will be set to FileJournalFileHandleInvalid.

Returns
false if the directory did not exist or if the visitor returned false.

Reimplemented from IPlatformFile.

◆ FileJournalReadModified()

virtual EFileJournalResult FCachedReadPlatformFile::FileJournalReadModified ( const TCHAR VolumeName,
const FFileJournalId JournalIdOfStartingEntry,
const FFileJournalEntryHandle StartingJournalEntry,
TMap< FFileJournalFileHandle, FString > &  KnownDirectories,
TSet< FString > &  OutModifiedDirectories,
FFileJournalEntryHandle OutNextJournalEntry,
FString *  OutError = nullptr 
)
inlineoverridevirtual

Query the FileJournal to find a list of all directories on the given volume with files that have been added, deleted, or modified in the specified time range. The beginning of the time range is specified by JournalIdOfStartingEntry and StartingJournalEntry, which came from FileJournalGetLatestEntry or a previous call to FileJournalReadModified. The end of the range is the latest modification on the volume. VolumeName can be the return value from FileJournalGetVolumeName, or any path on the desired volume.

The caller must provide the mapping from FFileJournalFileHandle to DirectoryName; the FFileJournalFileHandle for each Directory can be found from FileJournalGetFileData or FileJournalIterateDirectory.

Modified directories are appended into OutModifiedDirectories, and the next FileJournal entry to scan is written into OutNextJournalEntry.

Returns EFileJournalResult::Success if successful, otherwise an error code and optionally a user-displayable explanation for the error code. In an error case, partial results may still be written into the output.

Reimplemented from IPlatformFile.

◆ FileSize()

virtual int64 FCachedReadPlatformFile::FileSize ( const TCHAR Filename)
inlineoverridevirtual

Return the size of the file, or -1 if it doesn't exist.

Implements IPlatformFile.

◆ FindFiles()

virtual void FCachedReadPlatformFile::FindFiles ( TArray< FString > &  FoundFiles,
const TCHAR Directory,
const TCHAR FileExtension 
)
inlinevirtual

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

Parameters
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.
Returns
FoundFiles All the files that matched the optional FileExtension filter, or all files if none was specified.

Reimplemented from IPlatformFile.

◆ FindFilesRecursively()

virtual void FCachedReadPlatformFile::FindFilesRecursively ( TArray< FString > &  FoundFiles,
const TCHAR Directory,
const TCHAR FileExtension 
)
inlinevirtual

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

Parameters
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.
Returns
FoundFiles All the files that matched the optional FileExtension filter, or all files if none was specified.

Reimplemented from IPlatformFile.

◆ GetAccessTimeStamp()

virtual FDateTime FCachedReadPlatformFile::GetAccessTimeStamp ( const TCHAR Filename)
inlineoverridevirtual

Return the last access time of a file. Returns FDateTime::MinValue() on failure

Implements IPlatformFile.

◆ GetFilenameOnDisk()

virtual FString FCachedReadPlatformFile::GetFilenameOnDisk ( const TCHAR Filename)
inlineoverridevirtual

For case insensitive filesystems, returns the full path of the file with the same case as in the filesystem

Implements IPlatformFile.

◆ GetLowerLevel()

IPlatformFile * FCachedReadPlatformFile::GetLowerLevel ( )
inlineoverridevirtual

Gets the platform file wrapped by this file.

Implements IPlatformFile.

◆ GetName()

virtual const TCHAR * FCachedReadPlatformFile::GetName ( ) const
inlineoverridevirtual

Gets this platform file type name.

Implements IPlatformFile.

◆ GetStatData()

virtual FFileStatData FCachedReadPlatformFile::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

Implements IPlatformFile.

◆ GetTimeStamp()

virtual FDateTime FCachedReadPlatformFile::GetTimeStamp ( const TCHAR Filename)
inlineoverridevirtual

Return the modification time of a file. Returns FDateTime::MinValue() on failure

Implements IPlatformFile.

◆ GetTypeName()

static const TCHAR * FCachedReadPlatformFile::GetTypeName ( )
inlinestatic

◆ Initialize()

virtual bool FCachedReadPlatformFile::Initialize ( IPlatformFile Inner,
const TCHAR CmdLine 
)
inlineoverridevirtual

Initializes platform file.

Parameters
InnerPlatform file to wrap by this file.
CmdLineCommand line to parse.
Returns
true if the initialization was successful, false otherise.

Implements IPlatformFile.

◆ IsReadOnly()

virtual bool FCachedReadPlatformFile::IsReadOnly ( const TCHAR Filename)
inlineoverridevirtual

Return true if the file is read only.

Implements 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.

Parameters
DirectoryThe directory to iterate the contents of.
VisitorVisitor to call for each element of the directory
Returns
false if the directory did not exist or if the visitor returned false.

Implements IPlatformFile.

◆ IterateDirectory() [2/3]

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.

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

Reimplemented from IPlatformFile.

◆ IterateDirectory() [3/3]

virtual bool FCachedReadPlatformFile::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.

Parameters
DirectoryThe directory to iterate the contents of.
VisitorVisitor to call for each element of the directory
Returns
false if the directory did not exist or if the visitor returned false.

Implements IPlatformFile.

◆ IterateDirectoryRecursively() [1/3]

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.

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

Reimplemented from IPlatformFile.

◆ IterateDirectoryRecursively() [2/3]

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.

Parameters
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).
Returns
false if the directory did not exist or if the visitor returned false.

Reimplemented from IPlatformFile.

◆ IterateDirectoryRecursively() [3/3]

virtual bool FCachedReadPlatformFile::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.

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

Reimplemented from 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.

Parameters
DirectoryThe directory to iterate the contents of.
VisitorVisitor to call for each element of the directory
Returns
false if the directory did not exist or if the visitor returned false.

Implements IPlatformFile.

◆ IterateDirectoryStat() [2/3]

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.

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

Reimplemented from IPlatformFile.

◆ IterateDirectoryStat() [3/3]

virtual bool FCachedReadPlatformFile::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.

Parameters
DirectoryThe directory to iterate the contents of.
VisitorVisitor to call for each element of the directory
Returns
false if the directory did not exist or if the visitor returned false.

Implements IPlatformFile.

◆ IterateDirectoryStatRecursively() [1/3]

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.

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

Reimplemented from IPlatformFile.

◆ IterateDirectoryStatRecursively() [2/3]

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.

Parameters
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).
Returns
false if the directory did not exist or if the visitor returned false.

Reimplemented from IPlatformFile.

◆ IterateDirectoryStatRecursively() [3/3]

virtual bool FCachedReadPlatformFile::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.

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

Reimplemented from IPlatformFile.

◆ MoveFile()

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

Attempt to move a file. Return true if successful. Will not overwrite existing files.

Implements IPlatformFile.

◆ OpenAsyncRead()

virtual IAsyncReadFileHandle * FCachedReadPlatformFile::OpenAsyncRead ( const TCHAR Filename,
bool  bAllowWrite = false 
)
inlineoverridevirtual

Open a file for async reading. This call does not hit the disk or block.

Parameters
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.
Returns
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.

Reimplemented from IPlatformFile.

◆ OpenMappedEx()

virtual FOpenMappedResult FCachedReadPlatformFile::OpenMappedEx ( const TCHAR Filename,
EOpenReadFlags  OpenOptions = EOpenReadFlags::None,
int64  MaximumSize = 0 
)
inlineoverridevirtual

Open a file for async reading. This call does hit the disk; it is synchronous open.

Parameters
FilenameFile to be mapped. This doesn't actually map anything, just opens the file.
OpenOptionsAllows specifying map to be writable via AllowWrite or be ReadOnly by deafault.
Returns
Close the file by deleting 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.

Reimplemented from IPlatformFile.

◆ OpenRead()

virtual IFileHandle * FCachedReadPlatformFile::OpenRead ( const TCHAR Filename,
bool  bAllowWrite 
)
inlineoverridevirtual

Attempt to open a file for reading. Please consider using the new overload that takes EReadFlags instead of bools as parameters.

Parameters
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.
Returns
If successful will return a non-nullptr pointer. Close the file by deleting the handle.

Implements IPlatformFile.

◆ OpenWrite()

virtual IFileHandle * FCachedReadPlatformFile::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 deleting the handle.

Implements IPlatformFile.

◆ SendMessageToServer()

virtual bool FCachedReadPlatformFile::SendMessageToServer ( const TCHAR Message,
IFileServerMessageHandler Handler 
)
inlineoverridevirtual

Sends a message to the file server, and will block until it's complete. Will return immediately if the file manager doesn't support talking to a server.

Parameters
MessageThe string message to send to the server
Returns
true if the message was sent to server and it returned success, or false if there is no server, or the command failed

Reimplemented from IPlatformFile.

◆ SetAsyncMinimumPriority()

virtual void FCachedReadPlatformFile::SetAsyncMinimumPriority ( EAsyncIOPriorityAndFlags  MinPriority)
inlineoverridevirtual

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.

Parameters
MinPrioritythe minimum priority at which requests will get precached

Reimplemented from IPlatformFile.

◆ SetLowerLevel()

virtual void FCachedReadPlatformFile::SetLowerLevel ( IPlatformFile NewLowerLevel)
inlineoverridevirtual

Sets the platform file wrapped by this file.

Implements IPlatformFile.

◆ SetReadOnly()

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

Attempt to change the read only status of a file. Return true if successful.

Implements IPlatformFile.

◆ SetTimeStamp()

virtual void FCachedReadPlatformFile::SetTimeStamp ( const TCHAR Filename,
FDateTime  DateTime 
)
inlineoverridevirtual

Sets the modification time of a file

Implements IPlatformFile.

◆ ShouldBeUsed()

virtual bool FCachedReadPlatformFile::ShouldBeUsed ( IPlatformFile Inner,
const TCHAR CmdLine 
) const
inlineoverridevirtual

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

Reimplemented from IPlatformFile.


The documentation for this class was generated from the following file: