Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
IPlatformFile Class Referenceabstract

#include <GenericPlatformFile.h>

+ Inheritance diagram for IPlatformFile:

Classes

class  FDirectoryStatVisitor
 
class  FDirectoryVisitor
 
class  IFileServerMessageHandler
 

Public Types

typedef TFunctionRef< bool(const TCHAR *, boolFDirectoryVisitorFunc)
 
typedef TFunctionRef< bool(const TCHAR *, const FFileStatData &) FDirectoryStatVisitorFunc)
 

Public Member Functions

virtual ~IPlatformFile ()
 
virtual void SetSandboxEnabled (bool bInEnabled)
 
virtual bool IsSandboxEnabled () const
 
virtual bool ShouldBeUsed (IPlatformFile *Inner, const TCHAR *CmdLine) const
 
virtual bool Initialize (IPlatformFile *Inner, const TCHAR *CmdLine)=0
 
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 IPlatformFileGetLowerLevel ()=0
 
virtual void SetLowerLevel (IPlatformFile *NewLowerLevel)=0
 
virtual const TCHAR * GetName () const =0
 
virtual bool FileExists (const TCHAR *Filename)=0
 
virtual int64 FileSize (const TCHAR *Filename)=0
 
virtual bool DeleteFile (const TCHAR *Filename)=0
 
virtual bool IsReadOnly (const TCHAR *Filename)=0
 
virtual bool MoveFile (const TCHAR *To, const TCHAR *From)=0
 
virtual bool SetReadOnly (const TCHAR *Filename, bool bNewReadOnlyValue)=0
 
virtual FDateTime GetTimeStamp (const TCHAR *Filename)=0
 
virtual void SetTimeStamp (const TCHAR *Filename, FDateTime DateTime)=0
 
virtual FDateTime GetAccessTimeStamp (const TCHAR *Filename)=0
 
virtual FString GetFilenameOnDisk (const TCHAR *Filename)=0
 
virtual bool IsSymlink (const TCHAR *Filename)
 
virtual IFileHandleOpenRead (const TCHAR *Filename, bool bAllowWrite=false)=0
 
virtual IFileHandleOpenReadNoBuffering (const TCHAR *Filename, bool bAllowWrite=false)
 
virtual IFileHandleOpenWrite (const TCHAR *Filename, bool bAppend=false, bool bAllowRead=false)=0
 
virtual bool DirectoryExists (const TCHAR *Directory)=0
 
virtual bool CreateDirectory (const TCHAR *Directory)=0
 
virtual bool DeleteDirectory (const TCHAR *Directory)=0
 
virtual FFileStatData GetStatData (const TCHAR *FilenameOrDirectory)=0
 
virtual bool IterateDirectory (const TCHAR *Directory, FDirectoryVisitor &Visitor)=0
 
virtual bool IterateDirectoryStat (const TCHAR *Directory, FDirectoryStatVisitor &Visitor)=0
 
virtual IAsyncReadFileHandle * OpenAsyncRead (const TCHAR *Filename)
 
virtual void SetAsyncMinimumPriority (EAsyncIOPriorityAndFlags MinPriority)
 
virtual IMappedFileHandleOpenMapped (const TCHAR *Filename)
 
virtual void GetTimeStampPair (const TCHAR *PathA, const TCHAR *PathB, FDateTime &OutTimeStampA, FDateTime &OutTimeStampB)
 
virtual FDateTime GetTimeStampLocal (const TCHAR *Filename)
 
virtual bool IterateDirectory (const TCHAR *Directory, FDirectoryVisitorFunc Visitor)
 
virtual bool IterateDirectoryStat (const TCHAR *Directory, FDirectoryStatVisitorFunc Visitor)
 
virtual bool IterateDirectoryRecursively (const TCHAR *Directory, FDirectoryVisitor &Visitor)
 
virtual bool IterateDirectoryStatRecursively (const TCHAR *Directory, FDirectoryStatVisitor &Visitor)
 
virtual bool IterateDirectoryRecursively (const TCHAR *Directory, FDirectoryVisitorFunc Visitor)
 
virtual bool IterateDirectoryStatRecursively (const TCHAR *Directory, FDirectoryStatVisitorFunc Visitor)
 
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)
 
virtual bool CreateDirectoryTree (const TCHAR *Directory)
 
virtual bool CopyFile (const TCHAR *To, const TCHAR *From, EPlatformFileRead ReadFlags=EPlatformFileRead::None, EPlatformFileWrite WriteFlags=EPlatformFileWrite::None)
 
virtual bool CopyDirectoryTree (const TCHAR *DestinationDirectory, const TCHAR *Source, bool bOverwriteAllExisting)
 
virtual FString ConvertToAbsolutePathForExternalAppForRead (const TCHAR *Filename)
 
virtual FString ConvertToAbsolutePathForExternalAppForWrite (const TCHAR *Filename)
 
virtual bool SendMessageToServer (const TCHAR *Message, IFileServerMessageHandler *Handler)
 
virtual bool DoesCreatePublicFiles ()
 
virtual void SetCreatePublicFiles (bool bCreatePublicFiles)
 

Static Public Member Functions

static IPlatformFileGetPlatformPhysical ()
 
static const TCHAR * GetPhysicalTypeName ()
 

Detailed Description

File I/O Interface

Definition at line 207 of file GenericPlatformFile.h.

Member Typedef Documentation

◆ FDirectoryStatVisitorFunc

typedef TFunctionRef<bool(const TCHAR*, const FFileStatData&) IPlatformFile::FDirectoryStatVisitorFunc)

File and directory visitor function that takes all the stat data

Definition at line 398 of file GenericPlatformFile.h.

◆ FDirectoryVisitorFunc

typedef TFunctionRef<bool(const TCHAR*, bool) IPlatformFile::FDirectoryVisitorFunc)

File and directory visitor function that takes only the name

Definition at line 381 of file GenericPlatformFile.h.

Constructor & Destructor Documentation

◆ ~IPlatformFile()

virtual IPlatformFile::~IPlatformFile ( )
inlinevirtual

Destructor.

Definition at line 215 of file GenericPlatformFile.h.

Member Function Documentation

◆ AddLocalDirectories()

virtual void IPlatformFile::AddLocalDirectories ( TArray< FString > & LocalDirectories)
inlinevirtual

Identifies any platform specific paths that are guaranteed to be local (i.e. cache, scratch space)

Definition at line 276 of file GenericPlatformFile.h.

+ Here is the call graph for this function:

◆ BypassSecurity()

virtual void IPlatformFile::BypassSecurity ( bool bInBypass)
inlinevirtual

Definition at line 284 of file GenericPlatformFile.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConvertToAbsolutePathForExternalAppForRead()

virtual FString IPlatformFile::ConvertToAbsolutePathForExternalAppForRead ( const TCHAR * Filename)
virtual

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 in FCachedReadPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ ConvertToAbsolutePathForExternalAppForWrite()

virtual FString IPlatformFile::ConvertToAbsolutePathForExternalAppForWrite ( const TCHAR * Filename)
virtual

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 in FCachedReadPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ CopyDirectoryTree()

virtual bool IPlatformFile::CopyDirectoryTree ( const TCHAR * DestinationDirectory,
const TCHAR * Source,
bool bOverwriteAllExisting )
virtual

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 in FCachedReadPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ CopyFile()

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

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

Reimplemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

◆ CreateDirectory()

virtual bool IPlatformFile::CreateDirectory ( const TCHAR * Directory)
pure virtual

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

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

◆ CreateDirectoryTree()

virtual bool IPlatformFile::CreateDirectoryTree ( const TCHAR * Directory)
virtual

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

Reimplemented in FCachedReadPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ DeleteDirectory()

virtual bool IPlatformFile::DeleteDirectory ( const TCHAR * Directory)
pure virtual

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

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ DeleteDirectoryRecursively()

virtual bool IPlatformFile::DeleteDirectoryRecursively ( const TCHAR * Directory)
virtual

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 in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ DeleteFile()

virtual bool IPlatformFile::DeleteFile ( const TCHAR * Filename)
pure virtual

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

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

◆ DirectoryExists()

virtual bool IPlatformFile::DirectoryExists ( const TCHAR * Directory)
pure virtual

Return true if the directory exists.

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ DoesCreatePublicFiles()

virtual bool IPlatformFile::DoesCreatePublicFiles ( )
inlinevirtual

Checks to see if this file system creates publicly accessible files

Returns
true if this file system creates publicly accessible files

Definition at line 603 of file GenericPlatformFile.h.

◆ FileExists()

virtual bool IPlatformFile::FileExists ( const TCHAR * Filename)
pure virtual

Return true if the file exists.

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ FileSize()

virtual int64 IPlatformFile::FileSize ( const TCHAR * Filename)
pure virtual

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

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ FindFiles()

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

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 in FCachedReadPlatformFile.

◆ FindFilesRecursively()

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

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 in FCachedReadPlatformFile.

◆ GetAccessTimeStamp()

virtual FDateTime IPlatformFile::GetAccessTimeStamp ( const TCHAR * Filename)
pure virtual

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

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ GetFilenameOnDisk()

virtual FString IPlatformFile::GetFilenameOnDisk ( const TCHAR * Filename)
pure virtual

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

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ GetLowerLevel()

virtual IPlatformFile * IPlatformFile::GetLowerLevel ( )
pure virtual

Gets the platform file wrapped by this file.

Implemented in IPhysicalPlatformFile, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ GetName()

virtual const TCHAR * IPlatformFile::GetName ( ) const
pure virtual

Gets this platform file type name.

Implemented in IPhysicalPlatformFile, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

◆ GetPhysicalTypeName()

static const TCHAR * IPlatformFile::GetPhysicalTypeName ( )
static

Returns the name of the physical platform file type.

+ Here is the caller graph for this function:

◆ GetPlatformPhysical()

static IPlatformFile & IPlatformFile::GetPlatformPhysical ( )
static

Physical file system of the platform, never wrapped.

◆ GetStatData()

virtual FFileStatData IPlatformFile::GetStatData ( const TCHAR * FilenameOrDirectory)
pure virtual

Return the stat data for the given file or directory. Check the FFileStatData::bIsValid member before using the returned data

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ GetTimeStamp()

virtual FDateTime IPlatformFile::GetTimeStamp ( const TCHAR * Filename)
pure virtual

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

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ GetTimeStampLocal()

virtual FDateTime IPlatformFile::GetTimeStampLocal ( const TCHAR * Filename)
virtual

Return the modification time of a file in the local time of the calling code (GetTimeStamp returns UTC). Returns FDateTime::MinValue() on failure

◆ GetTimeStampPair()

virtual void IPlatformFile::GetTimeStampPair ( const TCHAR * PathA,
const TCHAR * PathB,
FDateTime & OutTimeStampA,
FDateTime & OutTimeStampB )
virtual

◆ Initialize()

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

Initializes platform file.

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

Implemented in IPhysicalPlatformFile, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

◆ InitializeAfterProjectFilePath()

virtual void IPlatformFile::InitializeAfterProjectFilePath ( )
inlinevirtual

Performs initialization of the platform file after the project path has been set.

Definition at line 261 of file GenericPlatformFile.h.

◆ InitializeAfterSetActive()

virtual void IPlatformFile::InitializeAfterSetActive ( )
inlinevirtual

Performs initialization of the platform file after it has become the active (FPlatformFileManager.GetPlatformFile() will return this

Definition at line 256 of file GenericPlatformFile.h.

◆ InitializeNewAsyncIO()

virtual void IPlatformFile::InitializeNewAsyncIO ( )
inlinevirtual

Performs initialization of the platform file after the new async IO has been enabled

Definition at line 271 of file GenericPlatformFile.h.

◆ IsReadOnly()

virtual bool IPlatformFile::IsReadOnly ( const TCHAR * Filename)
pure virtual

Return true if the file is read only.

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ IsSandboxEnabled()

virtual bool IPlatformFile::IsSandboxEnabled ( ) const
inlinevirtual

Returns whether the sandbox is enabled or not

Returns
bool true if enabled, false if not

Definition at line 231 of file GenericPlatformFile.h.

+ Here is the caller graph for this function:

◆ IsSymlink()

virtual bool IPlatformFile::IsSymlink ( const TCHAR * Filename)
inlinevirtual

Return true if the file is a symbolic link

Definition at line 322 of file GenericPlatformFile.h.

◆ IterateDirectory() [1/2]

virtual bool IPlatformFile::IterateDirectory ( const TCHAR * Directory,
FDirectoryVisitor & Visitor )
pure 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.

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, FPlatformFileOpenLog, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ IterateDirectory() [2/2]

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.

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 in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

◆ IterateDirectoryRecursively() [1/2]

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.

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 in FCachedReadPlatformFile, FLoggedPlatformFile, FPlatformFileOpenLog, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ IterateDirectoryRecursively() [2/2]

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.

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 in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

◆ IterateDirectoryStat() [1/2]

virtual bool IPlatformFile::IterateDirectoryStat ( const TCHAR * Directory,
FDirectoryStatVisitor & Visitor )
pure 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.

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, FPlatformFileOpenLog, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ IterateDirectoryStat() [2/2]

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.

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 in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

◆ IterateDirectoryStatRecursively() [1/2]

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.

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 in FCachedReadPlatformFile, FLoggedPlatformFile, FPlatformFileOpenLog, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ IterateDirectoryStatRecursively() [2/2]

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.

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 in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

◆ MakeUniquePakFilesForTheseFiles()

virtual void IPlatformFile::MakeUniquePakFilesForTheseFiles ( const TArray< TArray< FString > > & InFiles)
inlinevirtual

Build an in memory unique pak file from a subset of files in this pak file

Definition at line 266 of file GenericPlatformFile.h.

◆ MoveFile()

virtual bool IPlatformFile::MoveFile ( const TCHAR * To,
const TCHAR * From )
pure virtual

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

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

◆ OpenAsyncRead()

virtual IAsyncReadFileHandle * IPlatformFile::OpenAsyncRead ( const TCHAR * Filename)
virtual

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

Parameters
Filenamefile to be opened
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 in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ OpenMapped()

virtual IMappedFileHandle * IPlatformFile::OpenMapped ( const TCHAR * Filename)
inlinevirtual

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

Reimplemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

Definition at line 445 of file GenericPlatformFile.h.

+ Here is the caller graph for this function:

◆ OpenRead()

virtual IFileHandle * IPlatformFile::OpenRead ( const TCHAR * Filename,
bool bAllowWrite = false )
pure virtual

Attempt to open a file for reading.

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 delete'ing the handle.

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ OpenReadNoBuffering()

virtual IFileHandle * IPlatformFile::OpenReadNoBuffering ( const TCHAR * Filename,
bool bAllowWrite = false )
inlinevirtual

Definition at line 333 of file GenericPlatformFile.h.

+ Here is the call graph for this function:

◆ OpenWrite()

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

Attempt to open a file for writing. If successful will return a non-nullptr pointer. Close the file by delete'ing the handle.

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ SendMessageToServer()

virtual bool IPlatformFile::SendMessageToServer ( const TCHAR * Message,
IFileServerMessageHandler * Handler )
inlinevirtual

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 in FCachedReadPlatformFile, and FPlatformFileOpenLog.

Definition at line 592 of file GenericPlatformFile.h.

+ Here is the caller graph for this function:

◆ SetAsyncMinimumPriority()

virtual void IPlatformFile::SetAsyncMinimumPriority ( EAsyncIOPriorityAndFlags MinPriority)
inlinevirtual

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 in FCachedReadPlatformFile, and FLoggedPlatformFile.

Definition at line 434 of file GenericPlatformFile.h.

+ Here is the caller graph for this function:

◆ SetCreatePublicFiles()

virtual void IPlatformFile::SetCreatePublicFiles ( bool bCreatePublicFiles)
inlinevirtual

Sets file system to create publicly accessible files or not

Parameters
bCreatePublicFilestrue to set the file system to create publicly accessible files

Definition at line 613 of file GenericPlatformFile.h.

◆ SetLowerLevel()

virtual void IPlatformFile::SetLowerLevel ( IPlatformFile * NewLowerLevel)
pure virtual

Sets the platform file wrapped by this file.

Implemented in IPhysicalPlatformFile, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

◆ SetReadOnly()

virtual bool IPlatformFile::SetReadOnly ( const TCHAR * Filename,
bool bNewReadOnlyValue )
pure virtual

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

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ SetSandboxEnabled()

virtual void IPlatformFile::SetSandboxEnabled ( bool bInEnabled)
inlinevirtual

Set whether the sandbox is enabled or not

Parameters
bInEnabledtrue to enable the sandbox, false to disable it

Definition at line 222 of file GenericPlatformFile.h.

+ Here is the caller graph for this function:

◆ SetTimeStamp()

virtual void IPlatformFile::SetTimeStamp ( const TCHAR * Filename,
FDateTime DateTime )
pure virtual

Sets the modification time of a file

Implemented in FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

+ Here is the caller graph for this function:

◆ ShouldBeUsed()

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

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 in IPhysicalPlatformFile, FCachedReadPlatformFile, FLoggedPlatformFile, and FPlatformFileOpenLog.

Definition at line 240 of file GenericPlatformFile.h.

◆ Tick()

virtual void IPlatformFile::Tick ( )
inlinevirtual

Platform file can override this to get a regular tick from the engine

Definition at line 293 of file GenericPlatformFile.h.


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