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

#include <StorageServerPlatformFile.h>

+ Inheritance diagram for FStorageServerPlatformFile:

Public Member Functions

 FStorageServerPlatformFile ()
 
virtual ~FStorageServerPlatformFile ()
 
virtual bool ShouldBeUsed (IPlatformFile *Inner, const TCHAR *CmdLine) const override
 
virtual bool Initialize (IPlatformFile *Inner, const TCHAR *CmdLine) override
 
virtual void InitializeAfterProjectFilePath () override
 
virtual 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 IsReadOnly (const TCHAR *Filename) override
 
virtual FDateTime GetTimeStamp (const TCHAR *Filename) override
 
virtual FDateTime GetAccessTimeStamp (const TCHAR *Filename) override
 
virtual IFileHandleOpenRead (const TCHAR *Filename, bool bAllowWrite=false) override
 
virtual bool DirectoryExists (const TCHAR *Directory) override
 
virtual FFileStatData GetStatData (const TCHAR *FilenameOrDirectory) override
 
virtual bool IterateDirectory (const TCHAR *Directory, FDirectoryVisitor &Visitor) override
 
virtual bool IterateDirectoryRecursively (const TCHAR *Directory, FDirectoryVisitor &Visitor) override
 
virtual bool IterateDirectoryStat (const TCHAR *Directory, FDirectoryStatVisitor &Visitor) override
 
virtual FOpenMappedResult OpenMappedEx (const TCHAR *Filename, EOpenReadFlags OpenOptions=EOpenReadFlags::None, int64 MaximumSize=0) override
 
virtual FString GetFilenameOnDisk (const TCHAR *Filename) override
 
virtual bool DeleteFile (const TCHAR *Filename) override
 
virtual bool MoveFile (const TCHAR *To, const TCHAR *From) override
 
virtual bool SetReadOnly (const TCHAR *Filename, bool bNewReadOnlyValue) override
 
virtual void SetTimeStamp (const TCHAR *Filename, FDateTime DateTime) override
 
virtual IFileHandleOpenWrite (const TCHAR *Filename, bool bAppend=false, bool bAllowRead=false) override
 
virtual bool CreateDirectory (const TCHAR *Directory) override
 
virtual bool DeleteDirectory (const TCHAR *Directory) override
 
virtual FString ConvertToAbsolutePathForExternalAppForRead (const TCHAR *Filename) override
 
virtual FString ConvertToAbsolutePathForExternalAppForWrite (const TCHAR *Filename) override
 
virtual bool SendMessageToServer (const TCHAR *Message, IPlatformFile::IFileServerMessageHandler *Handler) override
 
FStringView GetHostAddr () const override
 
void GetAndResetConnectionStats (FConnectionStats &OutStats) override
 
void SetAllowPackageIo (bool bInAllowPackageIo)
 
void SetAbortOnConnectionFailure (bool bInAbortOnConnectionFailure)
 
void SetCustomProjectStorePath (FStringView InProjectStorePath)
 
void UpdateFileList () override
 
- 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 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 bool FileJournalIsAvailable (const TCHAR *VolumeOrPath=nullptr, ELogVerbosity::Type *OutErrorLevel=nullptr, FString *OutError=nullptr)
 
virtual CORE_API uint64 FileJournalGetMaximumSize (const TCHAR *VolumeOrPath=nullptr, ELogVerbosity::Type *OutErrorLevel=nullptr, FString *OutError=nullptr) const
 
virtual CORE_API EFileJournalResult FileJournalGetLatestEntry (const TCHAR *VolumeName, FFileJournalId &OutJournalId, FFileJournalEntryHandle &OutEntryHandle, FString *OutError=nullptr)
 
virtual CORE_API bool FileJournalIterateDirectory (const TCHAR *Directory, FDirectoryJournalVisitorFunc Visitor, FString *OutError=nullptr)
 
virtual CORE_API FFileJournalData FileJournalGetFileData (const TCHAR *FilenameOrDirectory, FString *OutError=nullptr)
 
virtual CORE_API EFileJournalResult FileJournalReadModified (const TCHAR *VolumeName, const FFileJournalId &JournalIdOfStartingEntry, const FFileJournalEntryHandle &StartingJournalEntry, TMap< FFileJournalFileHandle, FString > &KnownDirectories, TSet< FString > &OutModifiedDirectories, FFileJournalEntryHandle &OutNextJournalEntry, FString *OutError=nullptr)
 
virtual CORE_API FString FileJournalGetVolumeName (FStringView InPath)
 
virtual CORE_API FFileOpenAsyncResult OpenAsyncRead (const TCHAR *Filename, EOpenReadFlags Flags)
 
virtual CORE_API IAsyncReadFileHandleOpenAsyncRead (const TCHAR *Filename, bool bAllowWrite=false)
 
virtual void SetAsyncMinimumPriority (EAsyncIOPriorityAndFlags MinPriority)
 
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 CORE_API bool IterateDirectory (const TCHAR *Directory, FDirectoryVisitorFunc Visitor)
 
virtual CORE_API bool IterateDirectoryStat (const TCHAR *Directory, FDirectoryStatVisitorFunc Visitor)
 
virtual CORE_API bool IterateDirectoryStatRecursively (const TCHAR *Directory, FDirectoryStatVisitor &Visitor)
 
virtual CORE_API bool IterateDirectoryRecursively (const TCHAR *Directory, FDirectoryVisitorFunc Visitor)
 
virtual CORE_API bool IterateDirectoryStatRecursively (const TCHAR *Directory, FDirectoryStatVisitorFunc Visitor)
 
virtual CORE_API void FindFiles (TArray< FString > &FoundFiles, const TCHAR *Directory, const TCHAR *FileExtension)
 
virtual CORE_API void FindFilesRecursively (TArray< FString > &FoundFiles, const TCHAR *Directory, const TCHAR *FileExtension)
 
virtual CORE_API bool DeleteDirectoryRecursively (const TCHAR *Directory)
 
virtual CORE_API bool CreateDirectoryTree (const TCHAR *Directory)
 
virtual CORE_API bool CopyFile (const TCHAR *To, const TCHAR *From, EPlatformFileRead ReadFlags=EPlatformFileRead::None, EPlatformFileWrite WriteFlags=EPlatformFileWrite::None)
 
virtual CORE_API bool CopyDirectoryTree (const TCHAR *DestinationDirectory, const TCHAR *Source, bool bOverwriteAllExisting)
 
virtual bool DoesCreatePublicFiles ()
 
virtual void SetCreatePublicFiles (bool bCreatePublicFiles)
 
virtual int64 GetAllowedBytesToWriteThrottledStorage (const TCHAR *DestinationPath=nullptr)
 

Friends

class FStorageServerFileHandle
 
template<typename ParentVisitorClass , typename DataType >
class FUniqueDirectoryStatVisitor
 

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
 
- Static Public Member Functions inherited from IPlatformFile
static CORE_API IPlatformFileGetPlatformPhysical ()
 
static CORE_API const TCHARGetPhysicalTypeName ()
 

Constructor & Destructor Documentation

◆ FStorageServerPlatformFile()

FStorageServerPlatformFile::FStorageServerPlatformFile ( )

◆ ~FStorageServerPlatformFile()

FStorageServerPlatformFile::~FStorageServerPlatformFile ( )
virtual

Member Function Documentation

◆ ConvertToAbsolutePathForExternalAppForRead()

FString FStorageServerPlatformFile::ConvertToAbsolutePathForExternalAppForRead ( const TCHAR Filename)
overridevirtual

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()

FString FStorageServerPlatformFile::ConvertToAbsolutePathForExternalAppForWrite ( const TCHAR Filename)
overridevirtual

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.

◆ CreateDirectory()

bool FStorageServerPlatformFile::CreateDirectory ( const TCHAR Directory)
overridevirtual

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

Implements IPlatformFile.

◆ DeleteDirectory()

bool FStorageServerPlatformFile::DeleteDirectory ( const TCHAR Directory)
overridevirtual

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

Implements IPlatformFile.

◆ DeleteFile()

bool FStorageServerPlatformFile::DeleteFile ( const TCHAR Filename)
overridevirtual

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

Implements IPlatformFile.

◆ DirectoryExists()

bool FStorageServerPlatformFile::DirectoryExists ( const TCHAR Directory)
overridevirtual

Return true if the directory exists.

Implements IPlatformFile.

◆ FileExists()

bool FStorageServerPlatformFile::FileExists ( const TCHAR Filename)
overridevirtual

Return true if the file exists.

Implements IPlatformFile.

◆ FileSize()

int64 FStorageServerPlatformFile::FileSize ( const TCHAR Filename)
overridevirtual

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

Implements IPlatformFile.

◆ GetAccessTimeStamp()

FDateTime FStorageServerPlatformFile::GetAccessTimeStamp ( const TCHAR Filename)
overridevirtual

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

Implements IPlatformFile.

◆ GetAndResetConnectionStats()

void FStorageServerPlatformFile::GetAndResetConnectionStats ( FConnectionStats OutStats)
overridevirtual

◆ GetFilenameOnDisk()

FString FStorageServerPlatformFile::GetFilenameOnDisk ( const TCHAR Filename)
overridevirtual

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

Implements IPlatformFile.

◆ GetHostAddr()

FStringView FStorageServerPlatformFile::GetHostAddr ( ) const
overridevirtual

◆ GetLowerLevel()

virtual IPlatformFile * FStorageServerPlatformFile::GetLowerLevel ( )
inlineoverridevirtual

Gets the platform file wrapped by this file.

Implements IPlatformFile.

◆ GetName()

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

Gets this platform file type name.

Implements IPlatformFile.

◆ GetStatData()

FFileStatData FStorageServerPlatformFile::GetStatData ( const TCHAR FilenameOrDirectory)
overridevirtual

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

Implements IPlatformFile.

◆ GetTimeStamp()

FDateTime FStorageServerPlatformFile::GetTimeStamp ( const TCHAR Filename)
overridevirtual

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

Implements IPlatformFile.

◆ Initialize()

bool FStorageServerPlatformFile::Initialize ( IPlatformFile Inner,
const TCHAR CmdLine 
)
overridevirtual

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.

◆ InitializeAfterProjectFilePath()

void FStorageServerPlatformFile::InitializeAfterProjectFilePath ( )
overridevirtual

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

Reimplemented from IPlatformFile.

◆ IsReadOnly()

bool FStorageServerPlatformFile::IsReadOnly ( const TCHAR Filename)
overridevirtual

Return true if the file is read only.

Implements IPlatformFile.

◆ IterateDirectory()

bool FStorageServerPlatformFile::IterateDirectory ( const TCHAR Directory,
FDirectoryVisitor Visitor 
)
overridevirtual

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()

bool FStorageServerPlatformFile::IterateDirectoryRecursively ( const TCHAR Directory,
IPlatformFile::FDirectoryVisitor Visitor 
)
overridevirtual

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()

bool FStorageServerPlatformFile::IterateDirectoryStat ( const TCHAR Directory,
FDirectoryStatVisitor Visitor 
)
overridevirtual

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.

◆ MoveFile()

bool FStorageServerPlatformFile::MoveFile ( const TCHAR To,
const TCHAR From 
)
overridevirtual

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

Implements IPlatformFile.

◆ OpenMappedEx()

FOpenMappedResult FStorageServerPlatformFile::OpenMappedEx ( const TCHAR Filename,
EOpenReadFlags  OpenOptions = EOpenReadFlags::None,
int64  MaximumSize = 0 
)
overridevirtual

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()

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

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()

IFileHandle * FStorageServerPlatformFile::OpenWrite ( const TCHAR Filename,
bool  bAppend = false,
bool  bAllowRead = false 
)
overridevirtual

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()

bool FStorageServerPlatformFile::SendMessageToServer ( const TCHAR Message,
IPlatformFile::IFileServerMessageHandler Handler 
)
overridevirtual

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.

◆ SetAbortOnConnectionFailure()

void FStorageServerPlatformFile::SetAbortOnConnectionFailure ( bool  bInAbortOnConnectionFailure)
inline

◆ SetAllowPackageIo()

void FStorageServerPlatformFile::SetAllowPackageIo ( bool  bInAllowPackageIo)
inline

◆ SetCustomProjectStorePath()

void FStorageServerPlatformFile::SetCustomProjectStorePath ( FStringView  InProjectStorePath)
inline

◆ SetLowerLevel()

virtual void FStorageServerPlatformFile::SetLowerLevel ( IPlatformFile NewLowerLevel)
inlineoverridevirtual

Sets the platform file wrapped by this file.

Implements IPlatformFile.

◆ SetReadOnly()

bool FStorageServerPlatformFile::SetReadOnly ( const TCHAR Filename,
bool  bNewReadOnlyValue 
)
overridevirtual

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

Implements IPlatformFile.

◆ SetTimeStamp()

void FStorageServerPlatformFile::SetTimeStamp ( const TCHAR Filename,
FDateTime  DateTime 
)
overridevirtual

Sets the modification time of a file

Implements IPlatformFile.

◆ ShouldBeUsed()

bool FStorageServerPlatformFile::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

Reimplemented from IPlatformFile.

◆ UpdateFileList()

void FStorageServerPlatformFile::UpdateFileList ( )
overridevirtual

Friends And Related Symbol Documentation

◆ FStorageServerFileHandle

◆ FUniqueDirectoryStatVisitor

template<typename ParentVisitorClass , typename DataType >
friend class FUniqueDirectoryStatVisitor
friend

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