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

#include <IPlatformFileSandboxWrapper.h>

+ Inheritance diagram for FSandboxPlatformFile:

Public Member Functions

virtual SANDBOXFILE_API ~FSandboxPlatformFile ()
 
virtual SANDBOXFILE_API void SetSandboxEnabled (bool bInEnabled) override
 
virtual SANDBOXFILE_API bool IsSandboxEnabled () const override
 
virtual SANDBOXFILE_API bool ShouldBeUsed (IPlatformFile *Inner, const TCHAR *CmdLine) const override
 
virtual SANDBOXFILE_API bool Initialize (IPlatformFile *Inner, const TCHAR *CmdLine) override
 
virtual SANDBOXFILE_API IPlatformFileGetLowerLevel () override
 
virtual SANDBOXFILE_API void SetLowerLevel (IPlatformFile *NewLowerLevel) override
 
virtual SANDBOXFILE_API const TCHARGetName () const override
 
SANDBOXFILE_API FString ConvertToSandboxPath (const TCHAR *Filename) const
 
SANDBOXFILE_API FString ConvertFromSandboxPath (const TCHAR *Filename) const
 
SANDBOXFILE_API const FString & GetSandboxDirectory () const
 
SANDBOXFILE_API const FString & GetGameSandboxDirectoryName ()
 
SANDBOXFILE_API const FString & GetAbsoluteRootDirectory () const
 
SANDBOXFILE_API const FString & GetAbsoluteGameDirectory ()
 
SANDBOXFILE_API const FString & GetAbsolutePathToGameDirectory ()
 
SANDBOXFILE_API void AddExclusion (const TCHAR *Wildcard, bool bIsDirectory=false)
 
SANDBOXFILE_API void RemoveExclusion (const TCHAR *Wildcard, bool bIsDirectory=false)
 
SANDBOXFILE_API void SetSandboxOnly (bool bInSandboxOnly)
 
virtual SANDBOXFILE_API bool FileExists (const TCHAR *Filename) override
 
virtual SANDBOXFILE_API int64 FileSize (const TCHAR *Filename) override
 
virtual SANDBOXFILE_API bool DeleteFile (const TCHAR *Filename) override
 
virtual SANDBOXFILE_API bool IsReadOnly (const TCHAR *Filename) override
 
virtual SANDBOXFILE_API bool MoveFile (const TCHAR *To, const TCHAR *From) override
 
virtual SANDBOXFILE_API bool SetReadOnly (const TCHAR *Filename, bool bNewReadOnlyValue) override
 
virtual SANDBOXFILE_API FDateTime GetTimeStamp (const TCHAR *Filename) override
 
virtual SANDBOXFILE_API void SetTimeStamp (const TCHAR *Filename, FDateTime DateTime) override
 
virtual SANDBOXFILE_API FDateTime GetAccessTimeStamp (const TCHAR *Filename) override
 
virtual SANDBOXFILE_API FString GetFilenameOnDisk (const TCHAR *Filename) override
 
virtual SANDBOXFILE_API IFileHandleOpenRead (const TCHAR *Filename, bool bAllowWrite=false) override
 
virtual SANDBOXFILE_API IFileHandleOpenWrite (const TCHAR *Filename, bool bAppend=false, bool bAllowRead=false) override
 
virtual SANDBOXFILE_API bool DirectoryExists (const TCHAR *Directory) override
 
virtual SANDBOXFILE_API bool CreateDirectory (const TCHAR *Directory) override
 
virtual SANDBOXFILE_API bool DeleteDirectory (const TCHAR *Directory) override
 
virtual SANDBOXFILE_API FFileStatData GetStatData (const TCHAR *FilenameOrDirectory) override
 
virtual SANDBOXFILE_API bool IterateDirectory (const TCHAR *Directory, IPlatformFile::FDirectoryVisitor &Visitor) override
 
virtual SANDBOXFILE_API bool IterateDirectoryRecursively (const TCHAR *Directory, IPlatformFile::FDirectoryVisitor &Visitor) override
 
virtual SANDBOXFILE_API bool IterateDirectoryStat (const TCHAR *Directory, IPlatformFile::FDirectoryStatVisitor &Visitor) override
 
virtual SANDBOXFILE_API bool IterateDirectoryStatRecursively (const TCHAR *Directory, IPlatformFile::FDirectoryStatVisitor &Visitor) override
 
virtual SANDBOXFILE_API bool DeleteDirectoryRecursively (const TCHAR *Directory) override
 
virtual SANDBOXFILE_API bool CreateDirectoryTree (const TCHAR *Directory) override
 
virtual SANDBOXFILE_API bool CopyFile (const TCHAR *To, const TCHAR *From, EPlatformFileRead ReadFlags=EPlatformFileRead::None, EPlatformFileWrite WriteFlags=EPlatformFileWrite::None) override
 
virtual SANDBOXFILE_API FString ConvertToAbsolutePathForExternalAppForRead (const TCHAR *Filename) override
 
virtual SANDBOXFILE_API FString ConvertToAbsolutePathForExternalAppForWrite (const TCHAR *Filename) override
 
virtual SANDBOXFILE_API IAsyncReadFileHandleOpenAsyncRead (const TCHAR *Filename, bool bAllowWrite=false) override
 
virtual SANDBOXFILE_API void SetAsyncMinimumPriority (EAsyncIOPriorityAndFlags Priority) override
 
virtual SANDBOXFILE_API IMappedFileHandleOpenMapped (const TCHAR *Filename) override
 
virtual SANDBOXFILE_API FOpenMappedResult OpenMappedEx (const TCHAR *Filename, EOpenReadFlags OpenOptions=EOpenReadFlags::None, int64 MaximumSize=0) 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 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 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 void GetTimeStampPair (const TCHAR *PathA, const TCHAR *PathB, FDateTime &OutTimeStampA, FDateTime &OutTimeStampB)
 
virtual CORE_API FDateTime GetTimeStampLocal (const TCHAR *Filename)
 
virtual CORE_API void FindFilesRecursively (TArray< FString > &FoundFiles, const TCHAR *Directory, const TCHAR *FileExtension)
 
virtual CORE_API bool CopyDirectoryTree (const TCHAR *DestinationDirectory, const TCHAR *Source, bool bOverwriteAllExisting)
 
virtual bool SendMessageToServer (const TCHAR *Message, IFileServerMessageHandler *Handler)
 
virtual bool DoesCreatePublicFiles ()
 
virtual void SetCreatePublicFiles (bool bCreatePublicFiles)
 
virtual int64 GetAllowedBytesToWriteThrottledStorage (const TCHAR *DestinationPath=nullptr)
 

Static Public Member Functions

static SANDBOXFILE_API TUniquePtr< FSandboxPlatformFileCreate (bool bInEntireEngineWillUseThisSandbox)
 
- Static Public Member Functions inherited from IPlatformFile
static CORE_API IPlatformFileGetPlatformPhysical ()
 
static CORE_API const TCHARGetPhysicalTypeName ()
 

Friends

class FSandboxVisitor
 
class FSandboxStatVisitor
 

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

◆ ~FSandboxPlatformFile()

FSandboxPlatformFile::~FSandboxPlatformFile ( )
virtual

Member Function Documentation

◆ AddExclusion()

void FSandboxPlatformFile::AddExclusion ( const TCHAR Wildcard,
bool  bIsDirectory = false 
)

Add exclusion. These files and / or directories pretend not to exist so that they cannot be accessed at all (except in the sandbox)

Parameters
WildcardFString::MatchesWildcard-type wild card to test for exclusion
bIsDirectoryif true, this is a directory @Caution, these have a performance cost

◆ ConvertFromSandboxPath()

FString FSandboxPlatformFile::ConvertFromSandboxPath ( const TCHAR Filename) const

◆ ConvertToAbsolutePathForExternalAppForRead()

FString FSandboxPlatformFile::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 FSandboxPlatformFile::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.

◆ ConvertToSandboxPath()

FString FSandboxPlatformFile::ConvertToSandboxPath ( const TCHAR Filename) const

Converts passed in filename to use a sandbox path.

Parameters
Filenamefilename (under game directory) to convert to use a sandbox path. Can be relative or absolute.
Returns
filename using sandbox path

◆ CopyFile()

bool FSandboxPlatformFile::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.

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.

◆ Create()

TUniquePtr< FSandboxPlatformFile > FSandboxPlatformFile::Create ( bool  bInEntireEngineWillUseThisSandbox)
static

◆ CreateDirectory()

bool FSandboxPlatformFile::CreateDirectory ( const TCHAR Directory)
overridevirtual

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

Implements IPlatformFile.

◆ CreateDirectoryTree()

bool FSandboxPlatformFile::CreateDirectoryTree ( const TCHAR Directory)
overridevirtual

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

Reimplemented from IPlatformFile.

◆ DeleteDirectory()

bool FSandboxPlatformFile::DeleteDirectory ( const TCHAR Directory)
overridevirtual

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

Implements IPlatformFile.

◆ DeleteDirectoryRecursively()

bool FSandboxPlatformFile::DeleteDirectoryRecursively ( const TCHAR Directory)
overridevirtual

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

bool FSandboxPlatformFile::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 FSandboxPlatformFile::DirectoryExists ( const TCHAR Directory)
overridevirtual

Return true if the directory exists.

Implements IPlatformFile.

◆ FileExists()

bool FSandboxPlatformFile::FileExists ( const TCHAR Filename)
overridevirtual

Return true if the file exists.

Implements IPlatformFile.

◆ FileSize()

int64 FSandboxPlatformFile::FileSize ( const TCHAR Filename)
overridevirtual

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

Implements IPlatformFile.

◆ GetAbsoluteGameDirectory()

const FString & FSandboxPlatformFile::GetAbsoluteGameDirectory ( )

Returns absolute game directory

◆ GetAbsolutePathToGameDirectory()

const FString & FSandboxPlatformFile::GetAbsolutePathToGameDirectory ( )

Returns absolute path to game directory (without the game directory itself)

◆ GetAbsoluteRootDirectory()

const FString & FSandboxPlatformFile::GetAbsoluteRootDirectory ( ) const

Returns absolute root directory

◆ GetAccessTimeStamp()

FDateTime FSandboxPlatformFile::GetAccessTimeStamp ( const TCHAR Filename)
overridevirtual

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

Implements IPlatformFile.

◆ GetFilenameOnDisk()

FString FSandboxPlatformFile::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.

◆ GetGameSandboxDirectoryName()

const FString & FSandboxPlatformFile::GetGameSandboxDirectoryName ( )

Returns the name of the sandbox directory for the game's content

◆ GetLowerLevel()

IPlatformFile * FSandboxPlatformFile::GetLowerLevel ( )
overridevirtual

Gets the platform file wrapped by this file.

Implements IPlatformFile.

◆ GetName()

const TCHAR * FSandboxPlatformFile::GetName ( ) const
overridevirtual

Gets this platform file type name.

Implements IPlatformFile.

◆ GetSandboxDirectory()

const FString & FSandboxPlatformFile::GetSandboxDirectory ( ) const

Returns sandbox directory

◆ GetStatData()

FFileStatData FSandboxPlatformFile::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 FSandboxPlatformFile::GetTimeStamp ( const TCHAR Filename)
overridevirtual

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

Implements IPlatformFile.

◆ Initialize()

bool FSandboxPlatformFile::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.

◆ IsReadOnly()

bool FSandboxPlatformFile::IsReadOnly ( const TCHAR Filename)
overridevirtual

Return true if the file is read only.

Implements IPlatformFile.

◆ IsSandboxEnabled()

bool FSandboxPlatformFile::IsSandboxEnabled ( ) const
overridevirtual

Returns whether the sandbox is enabled or not

Returns
bool true if enabled, false if not

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

bool FSandboxPlatformFile::IterateDirectory ( const TCHAR Directory,
IPlatformFile::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() [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]

bool FSandboxPlatformFile::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() [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]

bool FSandboxPlatformFile::IterateDirectoryStat ( const TCHAR Directory,
IPlatformFile::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.

◆ 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]

bool FSandboxPlatformFile::IterateDirectoryStatRecursively ( const TCHAR Directory,
IPlatformFile::FDirectoryStatVisitor 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.

◆ MoveFile()

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

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

Implements IPlatformFile.

◆ OpenAsyncRead()

IAsyncReadFileHandle * FSandboxPlatformFile::OpenAsyncRead ( const TCHAR Filename,
bool  bAllowWrite = false 
)
overridevirtual

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.

◆ OpenMapped()

IMappedFileHandle * FSandboxPlatformFile::OpenMapped ( const TCHAR Filename)
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.
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.

◆ OpenMappedEx()

FOpenMappedResult FSandboxPlatformFile::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 * FSandboxPlatformFile::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 * FSandboxPlatformFile::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.

◆ RemoveExclusion()

void FSandboxPlatformFile::RemoveExclusion ( const TCHAR Wildcard,
bool  bIsDirectory = false 
)

◆ SetAsyncMinimumPriority()

void FSandboxPlatformFile::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.

Parameters
MinPrioritythe minimum priority at which requests will get precached

Reimplemented from IPlatformFile.

◆ SetLowerLevel()

void FSandboxPlatformFile::SetLowerLevel ( IPlatformFile NewLowerLevel)
overridevirtual

Sets the platform file wrapped by this file.

Implements IPlatformFile.

◆ SetReadOnly()

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

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

Implements IPlatformFile.

◆ SetSandboxEnabled()

void FSandboxPlatformFile::SetSandboxEnabled ( bool  bInEnabled)
overridevirtual

Set whether the sandbox is enabled or not

Parameters
bInEnabledtrue to enable the sandbox, false to disable it

Reimplemented from IPlatformFile.

◆ SetSandboxOnly()

void FSandboxPlatformFile::SetSandboxOnly ( bool  bInSandboxOnly)

Whether access is restricted the the sandbox or not.

◆ SetTimeStamp()

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

Sets the modification time of a file

Implements IPlatformFile.

◆ ShouldBeUsed()

bool FSandboxPlatformFile::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.

Friends And Related Symbol Documentation

◆ FSandboxStatVisitor

◆ FSandboxVisitor

friend class FSandboxVisitor
friend

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