nsIEnvironment

Scriptable access to the current process environment.

Methods

set(aName, aValue)

Set the value of an environment variable.

Parameters

aName the variable name to set.
aValue the value to set.

get(aName)

Get the value of an environment variable.

Parameters

aName the variable name to retrieve.

Returns

returns the value of the env variable. An empty string will be returned when the env variable does not exist or when the value itself is an empty string - please use |exists()| to probe whether the env variable exists or not.

exists(aName)

Check the existence of an environment variable.
This method checks whether an environment variable is present in
the environment or not.

Parameters

aName the variable name to probe.

Returns

if the variable has been set, the value returned is PR_TRUE. If the variable was not defined in the environment PR_FALSE will be returned.