IPlatformFile

Inheritance Hierarchy

Syntax

class IPlatformFile

Remarks

File I/O Interface

Destructors

Name Description

Public function Virtual

~IPlatformFile()

Destructor.

Functions

Name Description

Public function Virtual

void

 

AddLocalDirectories

(
    TArray < FString >& LocalDirectorie...
)

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

Public function Virtual

void

 

BypassSecurity

(
    bool bInBypass
)

Public function Virtual

FString

 

ConvertToAbsolutePathForExternalAppForRead

(
    const TCHAR * Filename
)

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

filename using absolute path

Public function Virtual

FString

 

ConvertToAbsolutePathForExternalAppForWrite

(
    const TCHAR * Filename
)

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

filename using absolute path

Public function Virtual

bool

 

CopyDirectoryTree

(
    const TCHAR * DestinationDirect...,
    const TCHAR * Source,
    bool bOverwriteAllExisting
)

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

true if operation completed successfully.

Public function Virtual

bool

 

CopyFile

(
    const TCHAR * To,
    const TCHAR * From,
    EPlatformFileRead ReadFlags,
    EPlatformFileWrite WriteFlags
)

Copy a file.

Public function

bool

 

CreateDirectory

(
    const TCHAR * Directory
)

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

Public function Virtual

bool

 

CreateDirectoryTree

(
    const TCHAR * Directory
)

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

Public function

bool

 

DeleteDirectory

(
    const TCHAR * Directory
)

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

Public function Virtual

bool

 

DeleteDirectoryRecursively

(
    const TCHAR * Directory
)

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

Public function

bool

 

DeleteFile

(
    const TCHAR * Filename
)

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

Public function

bool

 

DirectoryExists

(
    const TCHAR * Directory
)

Return true if the directory exists.

Public function

bool

 

FileExists

(
    const TCHAR * Filename
)

Return true if the file exists.

Public function

int64

 

FileSize

(
    const TCHAR * Filename
)

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

Public function

FDateTime

 

GetAccessTimeStamp

(
    const TCHAR * Filename
)

Return the last access time of a file.

Public function

FString

 

GetFilenameOnDisk

(
    const TCHAR * Filename
)

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

Public function

IPlatformFil ...

 

GetLowerLevel()

Gets the platform file wrapped by this file.

Public function

const TCHAR ...

 

GetName()

Gets this platform file type name.

Public function Static

const TCHAR ...

 

GetPhysicalTypeName()

Returns the name of the physical platform file type.

Public function Static

IPlatformFil ...

 

GetPlatformPhysical()

Physical file system of the platform, never wrapped.

Public function

FFileStatDat ...

 

GetStatData

(
    const TCHAR * FilenameOrDirecto...
)

Return the stat data for the given file or directory.

Public function

FDateTime

 

GetTimeStamp

(
    const TCHAR * Filename
)

Return the modification time of a file.

Public function Virtual

FDateTime

 

GetTimeStampLocal

(
    const TCHAR * Filename
)

Return the modification time of a file in the local time of the calling code (GetTimeStamp returns UTC).

Public function Virtual

void

 

GetTimeStampPair

(
    const TCHAR * PathA,
    const TCHAR * PathB,
    FDateTime & OutTimeStampA,
    FDateTime & OutTimeStampB
)

Public function

bool

 

Initialize

(
    IPlatformFile * Inner,
    const TCHAR * CmdLine
)

Initializes platform file.

true if the initialization was successful, false otherise.

Public function Virtual

void

 

InitializeAfterSetActive()

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

Public function Virtual

void

 

InitializeNewAsyncIO()

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

Public function

bool

 

IsReadOnly

(
    const TCHAR * Filename
)

Return true if the file is read only.

Public function Virtual

bool

 

IsSandboxEnabled()

Returns whether the sandbox is enabled or not

bool true if enabled, false if not

Public function

bool

 

IterateDirectory

(
    const TCHAR * Directory,
    FDirectoryVisitor & Visitor
)

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

Public function Virtual

bool

 

IterateDirectoryRecursively

(
    const TCHAR * Directory,
    FDirectoryVisitor & Visitor
)

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

Public function

bool

 

IterateDirectoryStat

(
    const TCHAR * Directory,
    FDirectoryStatVisitor & Visitor
)

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

Public function Virtual

bool

 

IterateDirectoryStatRecursively

(
    const TCHAR * Directory,
    FDirectoryStatVisitor & Visitor
)

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

Public function

bool

 

MoveFile

(
    const TCHAR * To,
    const TCHAR * From
)

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

Public function Virtual

IAsyncReadFi ...

 

OpenAsyncRead

(
    const TCHAR * Filename
)

Open a file for async reading.

Public function

IFileHandle ...

 

OpenRead

(
    const TCHAR * Filename,
    bool bAllowWrite
)

Attempt to open a file for reading.

Public function Virtual

IFileHandle ...

 

OpenReadNoBuffering

(
    const TCHAR * Filename,
    bool bAllowWrite
)

Public function

IFileHandle ...

 

OpenWrite

(
    const TCHAR * Filename,
    bool bAppend,
    bool bAllowRead
)

Attempt to open a file for writing.

Public function Virtual

bool

 

SendMessageToServer

(
    const TCHAR * Message,
    IFileServerMessageHandler * Han...
)

Sends a message to the file server, and will block until it's complete.

Public function

void

 

SetLowerLevel

(
    IPlatformFile * NewLowerLevel
)

Sets the platform file wrapped by this file.

Public function

bool

 

SetReadOnly

(
    const TCHAR * Filename,
    bool bNewReadOnlyValue
)

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

Public function Virtual

void

 

SetSandboxEnabled

(
    bool bInEnabled
)

Set whether the sandbox is enabled or not

Public function

void

 

SetTimeStamp

(
    const TCHAR * Filename,
    FDateTime DateTime
)

Sets the modification time of a file

Public function Virtual

bool

 

ShouldBeUsed

(
    IPlatformFile * Inner,
    const TCHAR * CmdLine
)

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

Classes

Name

Description

Public class

FDirectoryStatVisitor

Base class for file and directory visitors that take all the stat data.

Public class

FDirectoryVisitor

Base class for file and directory visitors that take only the name.

Public class

IFileServerMessageHandler

Helper class to send/receive data to the file server function

References

Module

Core

Header

Runtime/Core/Public/GenericPlatform/GenericPlatformFile.h