![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <GenericPlatformFile.h>
Inheritance diagram for IFileHandle:Public Member Functions | |
| virtual | ~IFileHandle () |
| virtual int64 | Tell ()=0 |
| virtual bool | Seek (int64 NewPosition)=0 |
| virtual bool | SeekFromEnd (int64 NewPositionRelativeToEnd=0)=0 |
| virtual bool | Read (uint8 *Destination, int64 BytesToRead)=0 |
| virtual bool | ReadAt (uint8 *Destination, int64 BytesToRead, int64 Offset)=0 |
| virtual bool | Write (const uint8 *Source, int64 BytesToWrite)=0 |
| virtual bool | Flush (const bool bFullFlush=false)=0 |
| virtual bool | Truncate (int64 NewSize)=0 |
| virtual void | ShrinkBuffers () |
| virtual CORE_API int64 | Size () |
File handle interface.
|
inlinevirtual |
Destructor, also the only way to close the file handle
Flushes file handle to disk.
| bFullFlush | true to flush everything about the file (including its meta-data) with a strong guarantee that it will be on disk by the time this function returns, or false to let the operating/file system have more leeway about when the data actually gets written to disk |
Implemented in FFileHandleApple, FIOSFileHandle, FFileHandleUnix, FFileHandleWindows, FCachedFileHandle, FLoggedFileHandle, FManagedStorageFileWriteHandle, FNetworkFileHandle, FPakFileHandle< ReaderPolicy >, FStorageServerFileHandle, and FStreamingNetworkFileHandle.
Read bytes from the file.
| Destination | Buffer to holds the results, should be at least BytesToRead in size. |
| BytesToRead | Number of bytes to read into the destination. |
Implemented in FFileHandleApple, FIOSFileHandle, FFileHandleUnix, FFileHandleWindows, FCachedFileHandle, FLoggedFileHandle, FManagedStorageFileWriteHandle, FNetworkFileHandle, FPakFileHandle< ReaderPolicy >, FStorageServerFileHandle, and FStreamingNetworkFileHandle.
Change the current write or read position.
| NewPosition | new write or read position |
Implemented in FFileHandleApple, FIOSFileHandle, FFileHandleUnix, FFileHandleWindows, FCachedFileHandle, FLoggedFileHandle, FManagedStorageFileWriteHandle, FNetworkFileHandle, FPakFileHandle< ReaderPolicy >, FStorageServerFileHandle, and FStreamingNetworkFileHandle.
Change the current write or read position, relative to the end of the file.
| NewPositionRelativeToEnd | new write or read position, relative to the end of the file should be <=0! |
Implemented in FLoggedFileHandle, FPakFileHandle< ReaderPolicy >, FFileHandleApple, FIOSFileHandle, FFileHandleUnix, FFileHandleWindows, FCachedFileHandle, FManagedStorageFileWriteHandle, FNetworkFileHandle, FStorageServerFileHandle, and FStreamingNetworkFileHandle.
Minimizes optional system or process cache kept for the file.
Reimplemented in FFileHandleWindows, FCachedFileHandle, FLoggedFileHandle, and FManagedStorageFileWriteHandle.
|
virtual |
Return the total size of the file
Reimplemented in FFileHandleApple, FIOSFileHandle, FFileHandleUnix, FFileHandleWindows, FCachedFileHandle, FLoggedFileHandle, FManagedStorageFileWriteHandle, FPakFileHandle< ReaderPolicy >, FStorageServerFileHandle, and FStreamingNetworkFileHandle.
Return the current write or read position.
Implemented in FFileHandleApple, FIOSFileHandle, FFileHandleUnix, FCachedFileHandle, FLoggedFileHandle, FManagedStorageFileWriteHandle, FNetworkFileHandle, FPakFileHandle< ReaderPolicy >, FStorageServerFileHandle, FStreamingNetworkFileHandle, and FFileHandleWindows.
Truncate the file to the given size (in bytes).
| NewSize | Truncated file size (in bytes). |
Implemented in FFileHandleApple, FIOSFileHandle, FFileHandleUnix, FFileHandleWindows, FCachedFileHandle, FLoggedFileHandle, FManagedStorageFileWriteHandle, FNetworkFileHandle, FPakFileHandle< ReaderPolicy >, FStorageServerFileHandle, and FStreamingNetworkFileHandle.
Write bytes to the file.
| Source | Buffer to write, should be at least BytesToWrite in size. |
| BytesToWrite | Number of bytes to write. |
Implemented in FFileHandleApple, FIOSFileHandle, FFileHandleUnix, FFileHandleWindows, FCachedFileHandle, FLoggedFileHandle, FManagedStorageFileWriteHandle, FNetworkFileHandle, FPakFileHandle< ReaderPolicy >, FStorageServerFileHandle, and FStreamingNetworkFileHandle.