UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IAsyncReadFileHandle Class Referenceabstract

#include <AsyncFileHandle.h>

+ Inheritance diagram for IAsyncReadFileHandle:

Public Member Functions

 IAsyncReadFileHandle ()
 
virtual ~IAsyncReadFileHandle ()
 
virtual IAsyncReadRequestSizeRequest (FAsyncFileCallBack *CompleteCallback=nullptr)=0
 
virtual IAsyncReadRequestReadRequest (int64 Offset, int64 BytesToRead, EAsyncIOPriorityAndFlags PriorityAndFlags=AIOP_Normal, FAsyncFileCallBack *CompleteCallback=nullptr, uint8 *UserSuppliedMemory=nullptr)=0
 
virtual bool UsesCache ()
 
virtual void ShrinkHandleBuffers ()
 
 IAsyncReadFileHandle (const IAsyncReadFileHandle &)=delete
 
IAsyncReadFileHandleoperator= (const IAsyncReadFileHandle &)=delete
 

Constructor & Destructor Documentation

◆ IAsyncReadFileHandle() [1/2]

IAsyncReadFileHandle::IAsyncReadFileHandle ( )
inline

◆ ~IAsyncReadFileHandle()

virtual IAsyncReadFileHandle::~IAsyncReadFileHandle ( )
inlinevirtual

Destructor, also the only way to close the file handle. It is not legal to delete an async file with outstanding requests. You must always call WaitCompletion before deleting a request.

◆ IAsyncReadFileHandle() [2/2]

IAsyncReadFileHandle::IAsyncReadFileHandle ( const IAsyncReadFileHandle )
delete

Member Function Documentation

◆ operator=()

IAsyncReadFileHandle & IAsyncReadFileHandle::operator= ( const IAsyncReadFileHandle )
delete

◆ ReadRequest()

virtual IAsyncReadRequest * IAsyncReadFileHandle::ReadRequest ( int64  Offset,
int64  BytesToRead,
EAsyncIOPriorityAndFlags  PriorityAndFlags = AIOP_Normal,
FAsyncFileCallBack CompleteCallback = nullptr,
uint8 UserSuppliedMemory = nullptr 
)
pure virtual

Submit an async request and/or wait for an async request

Parameters
OffsetOffset into the file to start reading.
BytesToReadnumber of bytes to read. If this request is AIOP_Preache, the size can be anything, even MAX_int64, otherwise the size and offset must be fully contained in the file.
PriorityAndFlagsPriority and flags of the request. If this includes AIOP_FLAG_PRECACHE, then memory will never be returned. The request should always be canceled and waited for, even for a precache request.
CompleteCallbackCalled from an arbitrary thread when the request is complete. Can be nullptr, if non-null, must remain valid until it is called. It will always be called.
Returns
A request for the read. This is owned by the caller and must be deleted by the caller.

Implemented in FGenericAsyncReadFileHandle, FMicrosoftAsyncReadFileHandle, FAsyncReadFileHandleNull, FLoggingAsyncReadFileHandle, UE::BulkData::Private::FChunkReadFileHandle, FPakAsyncReadFileHandle, and FBypassPakAsyncReadFileHandle.

◆ ShrinkHandleBuffers()

virtual void IAsyncReadFileHandle::ShrinkHandleBuffers ( )
inlinevirtual

Minimizes buffers held internally by this handle.

Reimplemented in FGenericAsyncReadFileHandle.

◆ SizeRequest()

virtual IAsyncReadRequest * IAsyncReadFileHandle::SizeRequest ( FAsyncFileCallBack CompleteCallback = nullptr)
pure virtual

Request the size of the file. This is also essentially the existence check.

Parameters
CompleteCallbackCalled from an arbitrary thread when the request is complete. Can be nullptr, if non-null, must remain valid until it is called. It will always be called.
Returns
A request for the size. This is owned by the caller and must be deleted by the caller.

Implemented in FGenericAsyncReadFileHandle, FMicrosoftAsyncReadFileHandle, FAsyncReadFileHandleNull, FLoggingAsyncReadFileHandle, UE::BulkData::Private::FChunkReadFileHandle, FPakAsyncReadFileHandle, and FBypassPakAsyncReadFileHandle.

◆ UsesCache()

virtual bool IAsyncReadFileHandle::UsesCache ( )
inlinevirtual

Return true if this file is backed by a cache, if not, then precache requests are ignored.

Reimplemented in FAsyncReadFileHandleNull, FLoggingAsyncReadFileHandle, and FBypassPakAsyncReadFileHandle.


The documentation for this class was generated from the following file: