Zero Install .NET API 2.20.0
ZeroInstall.DesktopIntegration.Windows.PathEnv Class Reference

Manages the PATH environment variable. More...

Static Public Member Functions

static void AddDir (string directory, bool machineWide)
 Adds a directory to the search PATH. More...
 
static void RemoveDir (string directory, bool machineWide)
 Removes a directory from the search PATH. More...
 
static string[] Get (bool machineWide)
 Returns the current search PATH. More...
 
static void Set (string[] directories, bool machineWide)
 Sets the current search PATH. More...
 

Detailed Description

Manages the PATH environment variable.

Member Function Documentation

◆ AddDir()

static void ZeroInstall.DesktopIntegration.Windows.PathEnv.AddDir ( string  directory,
bool  machineWide 
)
inlinestatic

Adds a directory to the search PATH.

Parameters
directoryThe directory to add to the search PATH.
machineWidetrue to use the machine-wide PATH variable; false for the per-user variant.

◆ Get()

static string[] ZeroInstall.DesktopIntegration.Windows.PathEnv.Get ( bool  machineWide)
inlinestatic

Returns the current search PATH.

Parameters
machineWidetrue to use the machine-wide PATH variable; false for the per-user variant.
Returns
The individual directories listed in the search path.

◆ RemoveDir()

static void ZeroInstall.DesktopIntegration.Windows.PathEnv.RemoveDir ( string  directory,
bool  machineWide 
)
inlinestatic

Removes a directory from the search PATH.

Parameters
directoryThe directory to remove from the search PATH.
machineWidetrue to use the machine-wide PATH variable; false for the per-user variant.

◆ Set()

static void ZeroInstall.DesktopIntegration.Windows.PathEnv.Set ( string[]  directories,
bool  machineWide 
)
inlinestatic

Sets the current search PATH.

Parameters
directoriesThe individual directories to list in the search PATH.
machineWidetrue to use the machine-wide PATH variable; false for the per-user variant.

The documentation for this class was generated from the following file: