Properties

The properties is a struct containing key-value pairs of strings, which can be easily and efficiently written to and read from a file.

Constructors

this
this(string[string] valueMap)

Constructs a Properties from the given values.

this
this(string[] filenames)

Constructs a Properties by reading from each of the given files, in the order that they're provided. Note that properties in an earlier file will be overwritten by properties of the same key in later files.

Members

Functions

addAll
void addAll(Properties[] properties)

Adds all properties from the given Properties to this one, overwriting any properties with the same name.

addAll
void addAll(string[] filenames)

Adds all properties from the given files to this one.

get
string get(string key, string defaultValue)

Gets the value of a property, or returns the specified default value if the given property doesn't exist.

opBinaryRight
bool opBinaryRight(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Properties other)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
string opIndex(string key)

Gets the value of a property, or throws a missing property exception.

opIndexAssign
void opIndexAssign(string value, string key)

Assigns the given value to a property.

Variables

values
string[string] values;

The internal values of this properties struct.

Meta