Skip to main content

INI Functions

Functions for reading and writing INI configuration files.

ReadIniFileAsString

Pure Reads an entire INI file as a string.

C++

FString ReadIniFileAsString(const FString& FilePath)

Category: EFM|Data|INI

Blueprint Node

ƒRead Ini File As String
File Path
Return Value

ReadIniValue

Pure Reads a specific value from an INI file.

C++

FString ReadIniValue(const FString& FilePath, const FString& Section, const FString& Key)
ParameterTypeDescription
FilePathFStringFull path to the INI file
SectionFStringSection name (e.g., [Settings])
KeyFStringKey name within the section

Returns: The value string, or empty if not found

Category: EFM|Data|INI

Blueprint Node

ƒRead Ini Value
File Path
Section
Key
Return Value

WriteIniFile

Callable Deprecated - use WriteIniEntries instead. Writes raw, already-formatted INI text to a file as-is, overwriting anything already there. Doesn't understand INI structure, it's just a text dump.

C++

bool WriteIniFile(const FString& FilePath, const FString& Content)
ParameterTypeDescription
FilePathFStringFull file path, including the .ini extension
ContentFStringThe full INI text to write

Category: EFM|Data|INI

Blueprint Node

ƒWrite Ini File
File Path
Content
Return Value

WriteIniEntries

Callable Writes a fully-structured INI file in one call from a list of Section/Key/Value entries, grouped by section automatically.

C++

bool WriteIniEntries(const FString& FilePath, const TArray<FEFMIniEntry>& Entries)
ParameterTypeDescription
FilePathFStringFull file path, including the .ini extension. Overwrites anything already there.
EntriesTArray<FEFMIniEntry>The Section/Key/Value entries to write

Returns: true if the file was written successfully

Category: EFM|Data|INI

Blueprint Node

ƒWrite Ini Entries
File Path
Entries
Return Value

WriteIniValue

Callable Writes a single key-value pair to an INI file.

C++

bool WriteIniValue(const FString& FilePath, const FString& Section, const FString& Key, const FString& Value)
ParameterTypeDescription
FilePathFStringFull path to the INI file
SectionFStringSection name
KeyFStringKey name
ValueFStringValue to write

Returns: true if the value was written successfully

Category: EFM|Data|INI

Blueprint Node

ƒWrite Ini Value
File Path
Section
Key
Value
Return Value

Example

// Read a specific value
Volume = ReadIniValue(GameConfigPath, "Audio", "MasterVolume")

// Write a value
WriteIniValue(GameConfigPath, "Audio", "MasterVolume", "0.75")

// Read entire file
IniContent = ReadIniFileAsString(GameConfigPath)

// Write a fully-structured INI file in one call
Entries = [
MakeIniEntry("Audio", "MasterVolume", "0.75"),
MakeIniEntry("Audio", "MusicVolume", "0.5"),
MakeIniEntry("Video", "Resolution", "1920x1080")
]
WriteIniEntries(GameConfigPath, Entries)