FFileHelper

Syntax

struct FFileHelper

Functions

Name Description

Public function Static

void

 

BufferToString

(
    FString & Result,
    const uint8 * Buffer,
    int32 Size
)

Load a text file to an FString .

Public function Static

bool

 

CreateBitmap

(
    const TCHAR * Pattern,
    int32 DataWidth,
    int32 DataHeight,
    const FColor * Data,
    FIntRect * SubRectangle,
    IFileManager * FileManager,
    FString * OutFilename,
    bool bInWriteAlpha
)

Saves a 24/32Bit BMP file to disk

Saves a 24Bit BMP file to disk

Public function Static

bool

 

GenerateNextBitmapFilename

(
    const FString & Pattern,
    const FString & Extension,
    FString & OutFilename,
    IFileManager * FileManager
)

Generates the next unique bitmap filename with a specified extension

Public function Static

bool

 

IsFilenameValidForSaving

(
    const FString & Filename,
    FText & OutError
)

Checks to see if a filename is valid for saving.

Public function Static

bool

 

LoadANSITextFileToStrings

(
    const TCHAR * InFilename,
    IFileManager * InFileManager,
    TArray < FString >& OutStrings
)

Load the given ANSI text file to an array of strings - one FString per line of the file.

Public function Static

bool

 

LoadFileToArray

(
    TArray < uint8 >& Result,
    const TCHAR * Filename,
    uint32 Flags
)

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

Public function Static

bool

 

LoadFileToString

(
    FString & Result,
    const TCHAR * Filename,
    EHashOptions VerifyFlags
)

Load a text file to an FString .

Public function Static

bool

 

LoadFileToStringArray

(
    TArray < FString >& Result,
    const TCHAR * Filename,
    EHashOptions VerifyFlags
)

Load a text file to an array of strings.

Public function Static

bool

 

SaveArrayToFile

(
    TArrayView < const uint8 > Array,
    const TCHAR * Filename,
    IFileManager * FileManager,
    uint32 WriteFlags
)

Save a binary array to a file.

Public function Static

bool

 

SaveStringArrayToFile

(
    const TArray < FString >& Lines,
    const TCHAR * Filename,
    EEncodingOptions EncodingOptions,
    IFileManager * FileManager,
    uint32 WriteFlags
)

Write the FString to a file.

Public function Static

bool

 

SaveStringToFile

(
    const FString & String,
    const TCHAR * Filename,
    EEncodingOptions EncodingOptions,
    IFileManager * FileManager,
    uint32 WriteFlags
)

Write the FString to a file.

Enums

Name

Description

Public enum

EEncodingOptions

Public enum

EHashOptions

References

Module

Core

Header

Runtime/Core/Public/Misc/FileHelper.h