IniSection

* An inifile section wrapper.

Constructors

this
this(string name, IniFile!(sync) parent)

* Creates a new instance of IniSection. * Params: * name = The name of the section. * parent = The parent inifile.

Members

Functions

hasKey
bool hasKey(string key)

* Checks whether the section has a key or not. * Params: * key = The key to check for. * Returns: True if the key exists, false otherwise.

read
auto read(string key, lazy string defaultValue)

* Reads a value from the section. * Params: * key = The key to read. * defaultValue = (lazy) The default value. * Returns: The value if found, defaultValue otherwise.

read
auto read(string key, lazy string defaultValue, out T value)

* Reads a value from the section. * Params: * key = The key to read. * defaultValue = (lazy) The default value. * value = (out) The value if found, defaultValue otherwise. * Returns: The section.

read
auto read(string key)

* Reads a value from the section. * Params: * key = The key to read. * Throws: IniException if the key wasn't found or if the value is empty. * Returns: The value if found.

read
auto read(string key, out T value)

* Reads a value from the section. * Params: * key = The key to read. * value = The value if found. * Throws: IniException if the key wasn't found or if the value is empty. * Returns: The section.

write
auto write(string key, T value)

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

Properties

keys
string[] keys [@property getter]

* Gets the keys of the section.

name
string name [@property getter]

* Gets the name of the section.

parent
IniFile!(sync) parent [@property getter]

* Gets the parental inifile.

values
string[] values [@property getter]

* Gets the values of the section.

Meta