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)
| Parameter | Type | Description |
|---|---|---|
WorldContextObject | UObject* | World context (auto-filled in Blueprints) |
FilePath | FString | Full path to the file |
OnComplete | FOnFileReadComplete | Callback 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)
| Parameter | Type | Description |
|---|---|---|
WorldContextObject | UObject* | World context (auto-filled in Blueprints) |
FilePath | FString | Full path to the file |
OnComplete | FOnFileStringReadComplete | Callback 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)
| Parameter | Type | Description |
|---|---|---|
WorldContextObject | UObject* | World context (auto-filled in Blueprints) |
FilePath | FString | Full path to the file |
Data | TArray<uint8> | Bytes to write |
OnComplete | FOnFileWriteComplete | Callback 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)
| Parameter | Type | Description |
|---|---|---|
WorldContextObject | UObject* | World context (auto-filled in Blueprints) |
FilePath | FString | Full path to the file |
Content | FString | Text content to write |
OnComplete | FOnFileWriteComplete | Callback 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)
| Parameter | Type | Description |
|---|---|---|
WorldContextObject | UObject* | World context (auto-filled in Blueprints) |
Source | FString | Path to the source file |
Destination | FString | Path to the destination file |
OnComplete | FOnFileCopyComplete | Callback 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)
| Parameter | Type | Description |
|---|---|---|
WorldContextObject | UObject* | World context (auto-filled in Blueprints) |
Source | FString | Path to the source file |
Destination | FString | Path to the destination file |
OnComplete | FOnFileCopyComplete | Callback 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)