Options

Application startup options. The main purpose is to parse and store options about daemon mode, configuration file path and some other options that needed in application startup.

As the class is immutable, it can be passed between threads safely.

Constructors

this
this(string[] args)

Application args arguments parsing.

this
this(bool daemon, bool help, string configName, string genPath, string pidFile, string lockFile, bool showVersion)

Verbose creation from native D types.

Members

Functions

configPaths
InputRange!string configPaths()

Returns all paths where application should try to find configuration file.

updateConfigPath
immutable(Options) updateConfigPath(string path)

Creates new options with updated configuration path.

Manifest constants

helpMsg
enum helpMsg;

Application help message

versionMsg
enum versionMsg;

Application version message

Properties

configName
string configName [@property getter]

Configuration full file name

daemon
bool daemon [@property getter]

Is application should run in daemon mode

genConfigPath
string genConfigPath [@property getter]

Path where to generate configuration

help
bool help [@property getter]

Is application should show help message and exit

lockFile
string lockFile [@property getter]

Path to file that checked to no exists in daemon mode

pidFile
string pidFile [@property getter]

Path to file where daemon puts it pid

showVersion
bool showVersion [@property getter]

Is program should show it version and exit

Meta