Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/GenericPlatform
Inheritance Hierarchy
- IPlatformFile
- FCachedReadPlatformFile
- FLoggedPlatformFile
- FNetworkPlatformFile
- FStreamingNetworkPlatformFile
- FPakPlatformFile
- FPlatformFileOpenLog
- FSandboxPlatformFile
- IPhysicalPlatformFile
- FUnixPlatformFile
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformFile.h |
| Include | #include "GenericPlatform/GenericPlatformFile.h" |
Syntax
class IPlatformFile
Remarks
File I/O Interface
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Destructor. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddLocalDirectories
(
TArray< FString >& LocalDirectories |
Identifies any platform specific paths that are guaranteed to be local (i.e. cache, scratch space) | |
| void | BypassSecurity
(
bool bInBypass |
||
| FString | ConvertToAbsolutePathForExternalAppForRead
(
const TCHAR* Filename |
Converts passed in filename to use an absolute path (for reading). | |
| FString | ConvertToAbsolutePathForExternalAppForWrite
(
const TCHAR* Filename |
Converts passed in filename to use an absolute path (for writing) | |
| bool | CopyDirectoryTree
(
const TCHAR* DestinationDirectory, |
Copy a file or a hierarchy of files (directory). | |
| bool | CopyFile
(
const TCHAR* To, |
Copy a file. This will fail if the destination file already exists. | |
| bool | CreateDirectory
(
const TCHAR* Directory |
Create a directory and return true if the directory was created or already existed. | |
| bool | CreateDirectoryTree
(
const TCHAR* Directory |
Create a directory, including any parent directories and return true if the directory was created or already existed. | |
| bool | DeleteDirectory
(
const TCHAR* Directory |
Delete a directory and return true if the directory was deleted or otherwise does not exist. | |
| bool | DeleteDirectoryRecursively
(
const TCHAR* Directory |
Delete all files and subdirectories in a directory, then delete the directory itself | |
| bool | DeleteFile
(
const TCHAR* Filename |
Delete a file and return true if the file exists. Will not delete read only files. | |
| bool |
DirectoryExists
(
const TCHAR* Directory |
Return true if the directory exists. | |
| bool | Checks to see if this file system creates publicly accessible files | ||
| bool | FileExists
(
const TCHAR* Filename |
Return true if the file exists. | |
| int64 | FileSize
(
const TCHAR* Filename |
Return the size of the file, or -1 if it doesn't exist. | |
| void | Finds all the files within the given directory, with optional file extension filter | ||
| void | FindFilesRecursively
(
TArray< FString >& FoundFiles, |
Finds all the files within the directory tree, with optional file extension filter | |
| FDateTime | GetAccessTimeStamp
(
const TCHAR* Filename |
Return the last access time of a file. | |
| 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) | |
| FString | GetFilenameOnDisk
(
const TCHAR* Filename |
For case insensitive filesystems, returns the full path of the file with the same case as in the filesystem | |
| IPlatformFile * | Gets the platform file wrapped by this file. | ||
| const TCHAR * | GetName () |
Gets this platform file type name. | |
| const TCHAR * | Returns the name of the physical platform file type. | ||
| IPlatformFile & | Physical file system of the platform, never wrapped. | ||
| FFileStatData | GetStatData
(
const TCHAR* FilenameOrDirectory |
Return the stat data for the given file or directory. | |
| FDateTime | GetTimeStamp
(
const TCHAR* Filename |
Return the modification time of a file. | |
| FDateTime | GetTimeStampLocal
(
const TCHAR* Filename |
Return the modification time of a file in the local time of the calling code (GetTimeStamp returns UTC). | |
| void | GetTimeStampPair
(
const TCHAR* PathA, |
||
| bool | HasMarkOfTheWeb
(
FStringView Filename, |
Determine if the file has been downloaded from a web browser, based on platform-specific metadata. | |
| bool | Initialize
(
IPlatformFile* Inner, |
Initializes platform file. | |
| void | Performs initialization of the platform file after the project path has been set. | ||
| void | Performs initialization of the platform file after it has become the active (FPlatformFileManager.GetPlatformFile() will return this | ||
| void | Performs initialization of the platform file after the new async IO has been enabled | ||
| bool | IsReadOnly
(
const TCHAR* Filename |
Return true if the file is read only. | |
| bool | Returns whether the sandbox is enabled or not | ||
| ESymlinkResult | IsSymlink
(
const TCHAR* Filename |
Return true if the file is a symbolic link | |
| bool | IterateDirectory
(
const TCHAR* Directory, |
Call the visitor once for each file or directory in a single directory. | |
| bool | IterateDirectory
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a single directory. | |
| bool | IterateDirectoryRecursively
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a directory tree. | |
| bool | IterateDirectoryRecursively
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a directory tree. | |
| bool | IterateDirectoryStat
(
const TCHAR* Directory, |
Call the visitor once for each file or directory in a single directory. | |
| bool | IterateDirectoryStat
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a single directory. | |
| bool | IterateDirectoryStatRecursively
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a directory tree. | |
| bool | IterateDirectoryStatRecursively
(
const TCHAR* Directory, |
Call the Visit function of the visitor once for each file or directory in a directory tree. | |
| void | MakeUniquePakFilesForTheseFiles
(
const TArray< TArray< FString >>& InFiles |
Build an in memory unique pak file from a subset of files in this pak file | |
| bool | MoveFile
(
const TCHAR* To, |
Attempt to move a file. Return true if successful. Will not overwrite existing files. | |
| IAsyncReadFileHandle * | OpenAsyncRead
(
const TCHAR* Filename |
Open a file for async reading. This call does not hit the disk or block. | |
| IMappedFileHandle * | OpenMapped
(
const TCHAR* Filename |
Open a file for async reading. This call does hit the disk; it is synchronous open. | |
| IFileHandle * | OpenRead
(
const TCHAR* Filename, |
Attempt to open a file for reading. | |
| IFileHandle * | OpenReadNoBuffering
(
const TCHAR* Filename, |
||
| IFileHandle * | OpenWrite
(
const TCHAR* Filename, |
Attempt to open a file for writing. | |
| bool | SendMessageToServer
(
const TCHAR* Message, |
Sends a message to the file server, and will block until it's complete. | |
| void | SetAsyncMinimumPriority
(
EAsyncIOPriorityAndFlags MinPriority |
Controls if the pak precacher should process precache requests. | |
| void | SetCreatePublicFiles
(
bool bCreatePublicFiles |
Sets file system to create publicly accessible files or not | |
| void | SetLowerLevel
(
IPlatformFile* NewLowerLevel |
Sets the platform file wrapped by this file. | |
| bool | SetMarkOfTheWeb
(
FStringView Filename, |
Attempt to change the platform-specific metadata that indicates if the file has been downloaded from a web browser. | |
| bool | SetReadOnly
(
const TCHAR* Filename, |
Attempt to change the read only status of a file. Return true if successful. | |
| void | SetSandboxEnabled
(
bool bInEnabled |
Set whether the sandbox is enabled or not | |
| void | SetTimeStamp
(
const TCHAR* Filename, |
Sets the modification time of a file | |
| bool | ShouldBeUsed
(
IPlatformFile* Inner, |
Checks if this platform file should be used even though it was not asked to be. | |
| void | Tick () |
Platform file can override this to get a regular tick from the engine |
Classes
| Type | Name | Description | |
|---|---|---|---|
| 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. | ||
| IFileServerMessageHandler | Helper class to send/receive data to the file server function |
Typedefs
| Name | Description |
|---|---|
| FDirectoryStatVisitorFunc | File and directory visitor function that takes all the stat data |
| FDirectoryVisitorFunc | File and directory visitor function that takes only the name |