IniFile

* An inifile wrapper.

Constructors

this
this(string fileName)

* Creates a new instance of IniFile. * Params: * fileName = The file name of the inifile.

Members

Functions

addSection
void addSection(string section)

* Adds a new section to the inifile. * Params: * section = The section to add.

close
void close()

* Closes the inifile and writes its text if any changes has occured.

exists
bool exists()

* Checks whether the inifile exists or not. * Returns: True if the file exists, false otherwise.

getSection
auto getSection(string section)

* Gets a specific section of the inifile. * Params: * section = The section to get. * Returns: The section.

hasKey
bool hasKey(string section, string key)

* Checks whether the inifile has a specific key. * Params: * section = The section to check within. * key = The key to check for existence. * Returns: True if the key exists, falses otherwise.

hasSection
bool hasSection(string section)

* Checks whether the inifile has a specific section. * Params: * section = The section to check for existence. * Returns: True if the section exists, false otherwise.

open
void open()

* Opens the inifile and parses its text.

read
auto read(string section, string key)

* Reads an entry from the inifile. * Params: * section = The section to read from. * key = The key of the entry to read. * Returns: The value read.

write
void write(string section, string key, T value)

* Writes an entry to the inifile. * Params: * section = The section to write the entry to. * key = The key of the entry. * value = The value of the entry.

Properties

fileName
string fileName [@property getter]

* Gets the filename of the inifile.

sectionNames
string[] sectionNames [@property getter]

* Gets all the section names.

sections
IniSection!(sync)[] sections [@property getter]

* Gets all the sections.

Meta