Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/IPlatformFile
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FFileOpenResult OpenRead
(
const TCHAR* Filename, |
Open a file handle for reading. | GenericPlatform/GenericPlatformFile.h | |
IFileHandle * OpenRead
(
const TCHAR* Filename, |
Attempt to open a file for reading. | GenericPlatform/GenericPlatformFile.h |
OpenRead(const TCHAR *, EOpenReadFlags)
Description
Open a file handle for reading.
| Name | OpenRead |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformFile.h |
| Include Path | #include "GenericPlatform/GenericPlatformFile.h" |
| Source | /Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformFile.cpp |
virtual FFileOpenResult OpenRead
(
const TCHAR * Filename,
EOpenReadFlags Flags
)
The return value will either contain the valid file handle or an error message.
Parameters
| Name | Remarks |
|---|---|
| Filename | The file to be opened |
| Flags | Allows specialization of the open operation, |
See Also
-
EReadFlags
-
FFileOpenResult
OpenRead(const TCHAR *, bool)
Description
Attempt to open a file for reading. Please consider using the new overload that takes EReadFlags instead of bools as parameters.
| Name | OpenRead |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformFile.h |
| Include Path | #include "GenericPlatform/GenericPlatformFile.h" |
IFileHandle * OpenRead
(
const TCHAR * Filename,
bool bAllowWrite
)
If successful will return a non-nullptr pointer. Close the file by deleting the handle.
Parameters
| Name | Remarks |
|---|---|
| Filename | file 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. |