FFileHelper::LoadFileToArray

Load a binary file to a dynamic array with two uninitialized bytes at end as padding.

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/FileHelper.h

Include

#include "Misc/FileHelper.h"

Source

/Engine/Source/Runtime/Core/Private/Misc/FileHelper.cpp

Syntax

static bool LoadFileToArray
(
    TArray64< uint8 > & Result,
    const TCHAR * Filename,
    uint32 Flags
)

Remarks

Load a binary file to a dynamic array with two uninitialized bytes at end as padding.

Load a binary file to a dynamic array with two uninitialized bytes at end as padding. TArray64 version.

Parameters

Parameter

Description

Result

Receives the contents of the file

Filename

The file to read

Flags

Flags to pass to IFileManager::CreateFileReader