FConfigFile

Windows
MacOS
Linux

Inheritance Hierarchy

Syntax

class FConfigFile : public TMap< FString, FConfigSection >

Variables

Name Description

Public variable

FString

 

CacheKey

Key to the cache to speed up ini parsing

Public variable

TArray< FConfig...

 

CommandlineOptions

The collection of overrides which stemmed from the commandline

Public variable

bool

 

Dirty

Public variable

FName

 

Name

The name of this config file

Public variable

bool

 

NoSave

Public variable

FConfigFile ...

 

SourceConfigFile

The untainted config file which contains the coalesced base/default options. I.e. No Saved/ options

Public variable

FConfigFileHier...

 

SourceIniHierarchy

The collection of source files which were used to generate this file.

Constructors

Name Description

Public function

FConfigFile()

Public function

FConfigFile

(
    int32
)

Destructors

Name Description

Public function

~FConfigFile()

Functions

Name Description

Public function

void

 

AddMissingProperties

(
    const FConfigFile& InSourceFile
)

Adds any properties that exist in InSourceFile that this config file is missing

Public function

bool

 

Combine

(
    const FString& Filename
)

Public function

void

 

CombineFromBuffer

(
    const FString& Buffer
)

Public function

void

 

Dump

(
    FOutputDevice& Ar
)

Public function

FConfigSecti...

 

FindOrAddSection

(
    const FString& Name
)

Looks for a section by name, and creates an empty one if it can't be found

Public function Static

FString

 

GenerateExportedPropertyLine

(
    const FString& PropertyName,
    const FString& PropertyValue
)

Generate a correctly escaped line to add to the config file for the given property

Public function Const

int32

 

GetArray

(
    const TCHAR* Section,
    const TCHAR* Key,
    TArray< FString >& Value
)

Public function Const

bool

 

GetBool

(
    const TCHAR* Section,
    const TCHAR* Key,
    bool& Value
)

Public function Const

bool

 

GetFloat

(
    const TCHAR* Section,
    const TCHAR* Key,
    float& Value
)

Public function Const

bool

 

GetInt

(
    const TCHAR* Section,
    const TCHAR* Key,
    int& Value
)

Public function Const

bool

 

GetInt64

(
    const TCHAR* Section,
    const TCHAR* Key,
    int64& Value
)

Public function Const

bool

 

GetString

(
    const TCHAR* Section,
    const TCHAR* Key,
    FString& Value
)

Public function Const

bool

 

GetText

(
    const TCHAR* Section,
    const TCHAR* Key,
    FText& Value
)

Public function Static

void

 

OverrideFromCommandline

(
    FConfigFile* File,
    const FString& Filename
)

Checks the command line for any overridden config settings

Public function

void

 

ProcessInputFileContents

(
    const FString& Contents
)

Process the contents of an .ini file that has been read into an FString

Public function

void

 

ProcessSourceAndCheckAgainstBackup()

Check the source hierarchy which was loaded without any user changes from the Config/Saved dir.

Public function

void

 

Read

(
    const FString& Filename
)

Public function

void

 

SetInt64

(
    const TCHAR* Section,
    const TCHAR* Key,
    const int64 Value
)

Public function

void

 

SetString

(
    const TCHAR* Section,
    const TCHAR* Key,
    const TCHAR* Value
)

Public function

void

 

SetText

(
    const TCHAR* Section,
    const TCHAR* Key,
    const FText& Value
)

Public function Static

bool

 

ShouldExportQuotedString

(
    const FString& PropertyValue
)

Checks if the PropertyValue should be exported in quotes when writing the ini to disk.

Public function

void

 

UpdateSections

(
    const TCHAR* DiskFilename,
    const TCHAR* IniRootName,
    const TCHAR* OverridePlatform
)

Saves only the sections in this FConfigFile its source files.

Public function

bool

 

UpdateSinglePropertyInSection

(
    const TCHAR* DiskFilename,
    const TCHAR* PropertyName,
    const TCHAR* SectionName
)

Update a single property in the config file, for the section that is specified.

Public function

bool

 

Write

(
    const FString& Filename,
    bool bDoRemoteWrite,
    const FString& InitialText
)

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const FConfigFile& Other
)

Public function Const

bool

 

operator==

(
    const FConfigFile& Other
)

References

Module

Core

Header

Runtime/Core/Public/Misc/ConfigCacheIni.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback