Skip to main content

EFMAsync

Async file operations with delegate callbacks. All functions run on background threads and do not block the game thread.

Delegates

FOnFileReadComplete

DECLARE_DYNAMIC_DELEGATE_TwoParams(FOnFileReadComplete, bool, bSuccess, const TArray<uint8>&, Data)

FOnFileWriteComplete

DECLARE_DYNAMIC_DELEGATE_TwoParams(FOnFileWriteComplete, bool, bSuccess, const FString&, FilePath)

FOnFileCopyComplete

DECLARE_DYNAMIC_DELEGATE_ThreeParams(FOnFileCopyComplete, bool, bSuccess, const FString&, Source, const FString&, Destination)

FOnFileStringReadComplete

DECLARE_DYNAMIC_DELEGATE_TwoParams(FOnFileStringReadComplete, bool, bSuccess, const FString&, Content)

Functions

AsyncReadFile

Callable Reads a file asynchronously as bytes.

C++

void AsyncReadFile(UObject* WorldContextObject, const FString& FilePath, FOnFileReadComplete OnComplete)
ParameterTypeDescription
WorldContextObjectUObject*World context (auto-filled in Blueprints)
FilePathFStringFull path to the file
OnCompleteFOnFileReadCompleteCallback with success and byte data

Category: EFM|Async

Blueprint Node

ƒAsync Read File
File Path
On Complete

AsyncReadFileAsString

Callable Reads a file asynchronously as a string.

C++

void AsyncReadFileAsString(UObject* WorldContextObject, const FString& FilePath, FOnFileStringReadComplete OnComplete)
ParameterTypeDescription
WorldContextObjectUObject*World context (auto-filled in Blueprints)
FilePathFStringFull path to the file
OnCompleteFOnFileStringReadCompleteCallback with success and string content

Category: EFM|Async

Blueprint Node

ƒAsync Read File As String
File Path
On Complete

AsyncWriteFile

Callable Writes bytes to a file asynchronously.

C++

void AsyncWriteFile(UObject* WorldContextObject, const FString& FilePath, const TArray<uint8>& Data, FOnFileWriteComplete OnComplete)
ParameterTypeDescription
WorldContextObjectUObject*World context (auto-filled in Blueprints)
FilePathFStringFull path to the file
DataTArray<uint8>Bytes to write
OnCompleteFOnFileWriteCompleteCallback with success and written file path

Category: EFM|Async

Blueprint Node

ƒAsync Write File
File Path
Data
On Complete

AsyncWriteString

Callable Writes a string to a file asynchronously.

C++

void AsyncWriteString(UObject* WorldContextObject, const FString& FilePath, const FString& Content, FOnFileWriteComplete OnComplete)
ParameterTypeDescription
WorldContextObjectUObject*World context (auto-filled in Blueprints)
FilePathFStringFull path to the file
ContentFStringText content to write
OnCompleteFOnFileWriteCompleteCallback with success and written file path

Category: EFM|Async

Blueprint Node

ƒAsync Write String
File Path
Content
On Complete

AsyncCopyFile

Callable Copies a file asynchronously.

C++

void AsyncCopyFile(UObject* WorldContextObject, const FString& Source, const FString& Destination, FOnFileCopyComplete OnComplete)
ParameterTypeDescription
WorldContextObjectUObject*World context (auto-filled in Blueprints)
SourceFStringPath to the source file
DestinationFStringPath to the destination file
OnCompleteFOnFileCopyCompleteCallback with success, source and destination paths

Category: EFM|Async

Blueprint Node

ƒAsync Copy File
Source
Destination
On Complete

AsyncMoveFile

Callable Moves a file asynchronously.

C++

void AsyncMoveFile(UObject* WorldContextObject, const FString& Source, const FString& Destination, FOnFileCopyComplete OnComplete)
ParameterTypeDescription
WorldContextObjectUObject*World context (auto-filled in Blueprints)
SourceFStringPath to the source file
DestinationFStringPath to the destination file
OnCompleteFOnFileCopyCompleteCallback with success, source and destination paths

Category: EFM|Async

Blueprint Node

ƒAsync Move File
Source
Destination
On Complete

Example

// Async read
AsyncReadFileAsString(Self, FilePath, OnComplete)
OnComplete(bSuccess, Content):
if bSuccess:
ProcessContent(Content)
else:
LogError("Failed to read file")

// Async write
AsyncWriteString(Self, FilePath, "Hello World", OnComplete)
OnComplete(bSuccess, WrittenPath):
if bSuccess:
Log("Written to: " + WrittenPath)