darg_plus.configfile

Validate and parse config files.

Members

Classes

ConfigFileException
class ConfigFileException

Thrown if an error while handling config file occurs.

Enums

SizeUnit
enum SizeUnit

Units for bytes.

Functions

fromBytes
auto fromBytes(in size_t bytes)

Convert bytes to

parseConfig
Options parseConfig(in string configFile)
Options parseConfig(in Json config)

Initialize options using config.

retroInitFromConfig
Options retroInitFromConfig(ref Options options, in string configFile)

Retroactively initialize options from config.

toBytes
auto toBytes(in size_t value, in SizeUnit unit)

Convert a value and unit to number of bytes.

validateConfig
void validateConfig(in Json config)

Validate config.

validateConfigFile
void validateConfigFile(in string configFile)

Validate config.

Manifest constants

configCommentPrefix
enum configCommentPrefix;

Keys prefixed with this string are ignored.

configEmptyArgument
enum configEmptyArgument;

String-type values equal to this string are considered empty.

maxConfigSize
enum maxConfigSize;

Maximum size of a valid config file.

Meta

License

Subject to the terms of the MIT license, as written in the included LICENSE file.

Authors

Arne Ludwig <arne.ludwig@posteo.de>