This section gives some standard operations on host objects, and some procedures that return some useful pathnames.
This variable has as its value the host object that describes the local host's file system.
Under unix, the init file is called .scheme.init; under Windows, the init file is called scheme.ini. In either case, it is located in the user's home directory, which is computed by
Returns a pathname for the user's “home directory” on host. The host argument defaults to the value of
local-host. The concept of a “home directory” is itself somewhat implementation-dependent, but it should be the place where the user keeps personal files, such as initialization files and mail.
Under unix, the user's home directory is specified by the
HOMEenvironment variable. If this variable is undefined, the user name is computed using the
getloginsystem call, or if that fails, the
getuidsystem call. The resulting user name is passed to the
getpwnamsystem call to obtain the home directory.
Under Windows, several heuristics are tried to find the user's home directory. The user's home directory is computed by examining several environment variables, in the following order:
HOMEPATHare both defined and %HOMEDRIVE%%HOMEPATH% is an existing directory. (These variables are automatically defined by Windows NT.)
HOMEis defined and %HOME% is an existing directory.
USERNAMEare defined and %USERDIR%\%USERNAME% is an existing directory.
USERare defined and %USERDIR%\%USER% is an existing directory.
USERNAMEis defined and %USERNAME% is an existing directory on the Windows system drive.
USERis defined and %USER% is an existing directory on the Windows system drive.
- Finally, if all else fails, the Windows system drive is used as the home directory.
(system-library-pathname "compiler.com") => #[pathname 45 "/usr/local/lib/mit-scheme/compiler.com"]
(system-library-directory-pathname "options") => #[pathname 44 "/usr/local/lib/mit-scheme/options/"]