Navigation
API > API/Runtime > API/Runtime/Core
File I/O Interface
| Name | IPlatformFile |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformFile.h |
| Include Path | #include "GenericPlatform/GenericPlatformFile.h" |
Syntax
class IPlatformFile
Derived Classes
IPlatformFile derived class hierarchy
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
IPlatformFile() |
Constructor/Destructor. | GenericPlatform/GenericPlatformFile.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~IPlatformFile() |
GenericPlatform/GenericPlatformFile.h |
Classes
| Name | Remarks |
|---|---|
| FDirectoryStatVisitor | Base class for file and directory visitors that take all the stat data. |
| FDirectoryVisitor | Base class for file and directory visitors that take only the name. |
Interfaces
| Name | Remarks |
|---|---|
| IFileServerMessageHandler | Helper class to send/receive data to the file server function |
Enums
Public
| Name | Remarks |
|---|---|
| EOpenReadFlags | Flags to be used when opening a file for reading via IPlatformFile::OpenRead |
| EOpenWriteFlags | Flags to be used when opening a file for writing. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FDirectoryJournalVisitorFunc | TFunctionRef< bool(const TCHAR *, const FFileJournalData &)> | File and directory visitor function that takes FileJournal data. | GenericPlatform/GenericPlatformFile.h |
| FDirectoryStatVisitorFunc | TFunctionRef< bool(const TCHAR *, const FFileStatData &)> | File and directory visitor function that takes all the stat data | GenericPlatform/GenericPlatformFile.h |
| FDirectoryVisitorFunc | TFunctionRef< bool(const TCHAR *, bool)> | File and directory visitor function that takes only the name | GenericPlatform/GenericPlatformFile.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Identifies any platform specific paths that are guaranteed to be local (i.e. cache, scratch space) | GenericPlatform/GenericPlatformFile.h | ||
virtual void BypassSecurity
(
bool bInBypass |
GenericPlatform/GenericPlatformFile.h | ||
virtual FString ConvertToAbsolutePathForExternalAppForRead
(
const TCHAR* Filename |
Converts passed in filename to use an absolute path (for reading). | GenericPlatform/GenericPlatformFile.h | |
virtual FString ConvertToAbsolutePathForExternalAppForWrite
(
const TCHAR* Filename |
Converts passed in filename to use an absolute path (for writing) | GenericPlatform/GenericPlatformFile.h | |
virtual bool CopyDirectoryTree
(
const TCHAR* DestinationDirectory, |
Copy a file or a hierarchy of files (directory). | GenericPlatform/GenericPlatformFile.h | |
virtual bool CopyFile
(
const TCHAR* To, |
Copy a file. This will fail if the destination file already exists. | GenericPlatform/GenericPlatformFile.h | |
bool CreateDirectory
(
const TCHAR* Directory |
Create a directory and return true if the directory was created or already existed. | GenericPlatform/GenericPlatformFile.h | |
virtual bool CreateDirectoryTree
(
const TCHAR* Directory |
Create a directory, including any parent directories and return true if the directory was created or already existed. | GenericPlatform/GenericPlatformFile.h | |
bool DeleteDirectory
(
const TCHAR* Directory |
Delete a directory and return true if the directory was deleted or otherwise does not exist. | GenericPlatform/GenericPlatformFile.h | |
virtual bool DeleteDirectoryRecursively
(
const TCHAR* Directory |
Delete all files and subdirectories in a directory, then delete the directory itself | GenericPlatform/GenericPlatformFile.h | |
bool DeleteFile
(
const TCHAR* Filename |
Delete a file and return true if the file exists. Will not delete read only files. | GenericPlatform/GenericPlatformFile.h | |
virtual bool DeleteFiles
(
const TArrayView< const TCHAR* >& Filenames |
Delete an array of files and return true if ALL deletes are succeeded. | GenericPlatform/GenericPlatformFile.h | |
bool DirectoryExists
(
const TCHAR* Directory |
Return true if the directory exists. | GenericPlatform/GenericPlatformFile.h | |
virtual bool DoesCreatePublicFiles() |
Checks to see if this file system creates publicly accessible files | GenericPlatform/GenericPlatformFile.h | |
bool FileExists
(
const TCHAR* Filename |
Return true if the file exists. | GenericPlatform/GenericPlatformFile.h | |
virtual FFileJournalData FileJournalGetFileData
(
const TCHAR* FilenameOrDirectory, |
Return the data for the given path as with GetStatData, but report a FFileJournalData instead, which notably includes the FFileJournalFileHandle for the file/directory. | GenericPlatform/GenericPlatformFile.h | |
virtual EFileJournalResult FileJournalGetLatestEntry
(
const TCHAR* VolumeName, |
Report the current end of the journal for the given volume, to be used as the StartingJournalEntry in FileJournalGetModifiedDirectories. | GenericPlatform/GenericPlatformFile.h | |
virtual uint64 FileJournalGetMaximumSize
(
const TCHAR* VolumeOrPath, |
Return the maximum size of the FileJournal for the specified VolumeName, if available, zero otherwise. | GenericPlatform/GenericPlatformFile.h | |
virtual FString FileJournalGetVolumeName
(
FStringView InPath |
Return the VolumeSpecifier present in the given path. | GenericPlatform/GenericPlatformFile.h | |
virtual bool FileJournalIsAvailable
(
const TCHAR* VolumeOrPath, |
Return whether FileJournal functionality is available on the current platform if VolumeName is nullptr or for the given Volume if VolumeName is non-null. | GenericPlatform/GenericPlatformFile.h | |
virtual bool FileJournalIterateDirectory
(
const TCHAR* Directory, |
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. | GenericPlatform/GenericPlatformFile.h | |
virtual EFileJournalResult FileJournalReadModified
(
const TCHAR* VolumeName, |
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. | GenericPlatform/GenericPlatformFile.h | |
int64 FileSize
(
const TCHAR* Filename |
Return the size of the file, or -1 if it doesn't exist. | GenericPlatform/GenericPlatformFile.h | |
| Finds all the files within the given directory, with optional file extension filter | GenericPlatform/GenericPlatformFile.h | ||
| Finds all the files within the directory tree, with optional file extension filter | GenericPlatform/GenericPlatformFile.h | ||
FDateTime GetAccessTimeStamp
(
const TCHAR* Filename |
Return the last access time of a file. | GenericPlatform/GenericPlatformFile.h | |
virtual int64 GetAllowedBytesToWriteThrottledStorage
(
const TCHAR* DestinationPath |
Returns the number of bytes that are currently allowed to be written to throttled write storage (if the platform has such restrictions) | GenericPlatform/GenericPlatformFile.h | |
FString GetFilenameOnDisk
(
const TCHAR* Filename |
For case insensitive filesystems, returns the full path of the file with the same case as in the filesystem | GenericPlatform/GenericPlatformFile.h | |
IPlatformFile * GetLowerLevel() |
Gets the platform file wrapped by this file. | GenericPlatform/GenericPlatformFile.h | |
const TCHAR * GetName() |
Gets this platform file type name. | GenericPlatform/GenericPlatformFile.h | |
FFileStatData GetStatData
(
const TCHAR* FilenameOrDirectory |
Return the stat data for the given file or directory. | GenericPlatform/GenericPlatformFile.h | |
FDateTime GetTimeStamp
(
const TCHAR* Filename |
Return the modification time of a file. | GenericPlatform/GenericPlatformFile.h | |
virtual FDateTime GetTimeStampLocal
(
const TCHAR* Filename |
Return the modification time of a file in the local time of the calling code (GetTimeStamp returns UTC). | GenericPlatform/GenericPlatformFile.h | |
| GenericPlatform/GenericPlatformFile.h | |||
virtual bool HasMarkOfTheWeb
(
FStringView Filename, |
Determine if the file has been downloaded from a web browser, based on platform-specific metadata. | GenericPlatform/GenericPlatformFile.h | |
bool Initialize
(
IPlatformFile* Inner, |
Initializes platform file. | GenericPlatform/GenericPlatformFile.h | |
virtual void InitializeAfterProjectFilePath() |
Performs initialization of the platform file after the project path has been set. | GenericPlatform/GenericPlatformFile.h | |
virtual void InitializeAfterSetActive() |
Performs initialization of the platform file after it has become the active (FPlatformFileManager.GetPlatformFile() will return this | GenericPlatform/GenericPlatformFile.h | |
virtual void InitializeNewAsyncIO() |
Performs initialization of the platform file after the new async IO has been enabled | GenericPlatform/GenericPlatformFile.h | |
bool IsReadOnly
(
const TCHAR* Filename |
Return true if the file is read only. | GenericPlatform/GenericPlatformFile.h | |
virtual bool IsSandboxEnabled() |
Returns whether the sandbox is enabled or not | GenericPlatform/GenericPlatformFile.h | |
virtual ESymlinkResult IsSymlink
(
const TCHAR* Filename |
Return true if the file is a symbolic link | GenericPlatform/GenericPlatformFile.h | |
virtual bool IterateDirectory
(
const TCHAR* Directory, |
Call the visitor once for each file or directory in a single directory. | GenericPlatform/GenericPlatformFile.h | |
bool IterateDirectory
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a single directory. | GenericPlatform/GenericPlatformFile.h | |
virtual bool IterateDirectoryRecursively
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a directory tree. | GenericPlatform/GenericPlatformFile.h | |
virtual bool IterateDirectoryRecursively
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a directory tree. | GenericPlatform/GenericPlatformFile.h | |
virtual bool IterateDirectoryStat
(
const TCHAR* Directory, |
Call the visitor once for each file or directory in a single directory. | GenericPlatform/GenericPlatformFile.h | |
bool IterateDirectoryStat
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a single directory. | GenericPlatform/GenericPlatformFile.h | |
virtual bool IterateDirectoryStatRecursively
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a directory tree. | GenericPlatform/GenericPlatformFile.h | |
virtual bool IterateDirectoryStatRecursively
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a directory tree. | GenericPlatform/GenericPlatformFile.h | |
| Build an in memory unique pak file from a subset of files in this pak file | GenericPlatform/GenericPlatformFile.h | ||
bool MoveFile
(
const TCHAR* To, |
Attempt to move a file. Return true if successful. Will not overwrite existing files. | GenericPlatform/GenericPlatformFile.h | |
virtual IAsyncReadFileHandle * OpenAsyncRead
(
const TCHAR* Filename, |
Open a file for async reading. This call does not hit the disk or block. | GenericPlatform/GenericPlatformFile.h | |
virtual FFileOpenAsyncResult OpenAsyncRead
(
const TCHAR* Filename, |
Open a file for async reading. This call does not hit the disk or block. | GenericPlatform/GenericPlatformFile.h | |
virtual IMappedFileHandle * OpenMapped
(
const TCHAR* Filename |
Open a file for async reading. This call does hit the disk; it is synchronous open. | GenericPlatform/GenericPlatformFile.h | |
virtual FOpenMappedResult OpenMappedEx
(
const TCHAR* Filename, |
Open a file for async reading. This call does hit the disk; it is synchronous open. | GenericPlatform/GenericPlatformFile.h | |
IFileHandle * OpenRead
(
const TCHAR* Filename, |
Attempt to open a file for reading. | GenericPlatform/GenericPlatformFile.h | |
virtual FFileOpenResult OpenRead
(
const TCHAR* Filename, |
Open a file handle for reading. | GenericPlatform/GenericPlatformFile.h | |
virtual FFileOpenResult OpenReadNoBuffering
(
const TCHAR* Filename, |
GenericPlatform/GenericPlatformFile.h | ||
virtual IFileHandle * OpenReadNoBuffering
(
const TCHAR* Filename, |
GenericPlatform/GenericPlatformFile.h | ||
IFileHandle * OpenWrite
(
const TCHAR* Filename, |
Attempt to open a file for writing. | GenericPlatform/GenericPlatformFile.h | |
virtual FFileOpenResult OpenWrite
(
const TCHAR* Filename, |
Open a file handle for writing. | GenericPlatform/GenericPlatformFile.h | |
virtual bool SendMessageToServer
(
const TCHAR* Message, |
Sends a message to the file server, and will block until it's complete. | GenericPlatform/GenericPlatformFile.h | |
virtual void SetAsyncMinimumPriority
(
EAsyncIOPriorityAndFlags MinPriority |
Controls if the pak precacher should process precache requests. | GenericPlatform/GenericPlatformFile.h | |
virtual void SetCreatePublicFiles
(
bool bCreatePublicFiles |
Sets file system to create publicly accessible files or not | GenericPlatform/GenericPlatformFile.h | |
void SetLowerLevel
(
IPlatformFile* NewLowerLevel |
Sets the platform file wrapped by this file. | GenericPlatform/GenericPlatformFile.h | |
virtual bool SetMarkOfTheWeb
(
FStringView Filename, |
Attempt to change the platform-specific metadata that indicates if the file has been downloaded from a web browser. | GenericPlatform/GenericPlatformFile.h | |
bool SetReadOnly
(
const TCHAR* Filename, |
Attempt to change the read only status of a file. Return true if successful. | GenericPlatform/GenericPlatformFile.h | |
virtual void SetSandboxEnabled
(
bool bInEnabled |
Set whether the sandbox is enabled or not | GenericPlatform/GenericPlatformFile.h | |
void SetTimeStamp
(
const TCHAR* Filename, |
Sets the modification time of a file | GenericPlatform/GenericPlatformFile.h | |
virtual bool ShouldBeUsed
(
IPlatformFile* Inner, |
Checks if this platform file should be used even though it was not asked to be. | GenericPlatform/GenericPlatformFile.h | |
virtual void Tick() |
Platform file can override this to get a regular tick from the engine | GenericPlatform/GenericPlatformFile.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static const TCHAR * GetPhysicalTypeName() |
Returns the name of the physical platform file type. | GenericPlatform/GenericPlatformFile.h | |
static IPlatformFile & GetPlatformPhysical() |
Physical file system of the platform, never wrapped. | GenericPlatform/GenericPlatformFile.h |