juno.base.environment Module

Provides information about the current environment.

Licence
See licence.txt for use and distribution terms.

char[] commandLine();

Gets the command line.

char[][] commandLineArgs();

Gets an array containing the command-line arguments.

void machineName(char[] value);
char[] machineName();

Gets or sets the NetBIOS name of the local computer.

char[] userName();

Gets the user name of the person currently logged on to Windows.

int tickCount();

Gets the number of milliseconds elapsed since the system started.

char[] expandEnvironmentVariables(char[] name);

Replaces the name of each environment variable embedded in the specified string with the string equivalent of the value of the variable.

Parameters
char[] name
A string containing the names of zero or more environment variables. Environment variables are quoted with the percent sign.

Returns
A string with each environment variable replaced by its value.

Examples
 writefln(expandEnvironmentVariables("My system drive is %SystemDrive% and my system root is %SystemRoot%"));

class Version;

Represents a version number.

this(int major, int minor, int build = -1, int revision = -1);

Initializes a new instance.

int major();

Gets the value of the major component.

int minor();

Gets the value of the minor component.

int build();

Gets the value of the build component.

int revision();

Gets the value of the revision component.

Version osVersion();

Gets a Version object describing the major, minor, build and revision numbers of the operating system.