::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:
class Program.Environment.Public  public Gilda
:
:...............................................................................



:::::::::::::::::::::::  program/environment/Environment  ::::::::::::::::::::::
:
sequence ENVIRONMENT  pure:  Scan all environment variables.

  exit Key..string          :Pairs of each variable name and value
:
:...............................................................................
:
function GET.ENVIRONMENT:  Get a variable from the environment.

 entry Name   string        :Environment variable name

  exit Value  string        :Current value; empty if undefined
:
:...............................................................................
:
method PUT.ENVIRONMENT:  Add a variable to the environment.

 entry Name   string,       &Environment variable name
       Value  string        :A value to assign
:
:  FAULT:  Out of space for another ENVIRONMENT variable.
:...............................................................................
:
method OPEN.PATH:  Set up access to Path variable components.

  exit Miss   Heap..string    :Directories on the PATH that do not exist
:
:...............................................................................
:
sequence ENVIRONMENT.PATH  pure:  Get paths on the PATH environment variable.

  exit Path  string           :Each component on the PATH
:
: Call OPEN.PATH before using this sequence.
: Otherwise is will not return any paths.
:...............................................................................
:
method SET.PATH:  Set or add a component to the PATH environment variable.

 entry Value  string          :Path list delimited by comma, semicolon,
                              :or colon (Unix only).  May have mixed slashes.

  exit Miss   Heap..string    :Missing paths.
:
:...............................................................................
:
method WHICH.PATH:  Find the first executable file along the search path.

 entry File     string       :Dual path (tame, mixed case, forward slash)

  exit Path     string,      &OS path name; Ends in ~ if executable
                             &Empty if missing
                             &Windows paths will have backslashes
       Attribute             :Attributes for the result
:
:   Environment.Path needs to be established by calling Open.Path.
:...............................................................................
:
method TEMPORARY.DIRECTORY:  Determine the temporary directory.

  exit Path   string     :Directory (forward slashes) with a trailing slash.
:
:...............................................................................
:
method SET.HOME:  Set the home directory separated by Path.Slash.

change Home   string             : In:  Desired new Home directory (Cross path).
                                 :Out:  New home or unchanged if no path.
                                 :      ( Tame Os path; lower or exact case;
                                 :        Path.Slash; trailing slash ).

precondition
   Home            fault;          Tried to clear the home path.
   Home.Path = ""  fault Home;     Tried to reset the home path.
.
:  Need to set home.base when the host in home.share is the host???
:
:  Exit:  Home.Path is always set.
:         Home.Drive is null or the drive letter of a drive-based home.
:         Home.Share is null or a share path when Home.Path is a drive path.
:...............................................................................
:
method GET.HOME:  Get the home directory separated by Path.Slash.

  exit Home   string         :Os path for home (tame; lower or exact case;
                             :            Path.Slash; trailing slash).
:
:  Need to set home.base when the host in home.share is the host???
:
:  Exit:  Home.Path is always set.
:         Home.Drive is null or the drive letter of a drive-based home.
:         Home.Share is null or a share path when Home.Path is a drive path.
:...............................................................................
:
method GET.HOME.EXIST:  Get the users home or a valid existing directory.

  exit Home   string             :Os path for home (tame; lower case;
                                 :            Path.Slash; trailing slash).
:
:...............................................................................
:
method GET.HOME.PATH:  Determine the home directory using the Home.Path
                    :  global or HOMEPATH and HOMESHARE environment variables.
:
:...............................................................................
:
method GET.HOME.DRIVE:  Get the drive to use as a basis for the Home.Path.
:
:...............................................................................



end