ConfigParser.parseFile

Read Config File

Reads the content of the configuration file and copies to a static array buffer.

Each property in the ini file belongs to a category. A property always has a key and a value associated with the key. The function parses the following different elements:

i. Categories [Example Category]

ii. Comments // comments start with two slashes, ; a semi-colon # or a hash

iii. Property key = value

iv. Multi-value property key = value1 value2 value3

class ConfigParser
void
parseFile
(
istring file_path = "etc/config.ini"
,
bool clean_old = true
)

Parameters

file_path istring

string that contains the path to the configuration file

clean_old bool

true if the existing configuration should be overwritten with the result of the current parse, false if the current parse should only add to or update the existing configuration. (defaults to true)

Examples

void main ()
{
    scope config = new ConfigParser();
    config.parseFile("etc/config.ini");
}

Meta