Vicinity
--------
A vicinity is a descriptor for a place in the file system. Vicinities
hide from the programmer the concepts of host, volume, directory, and
version. Vicinities express only the concept of a file environment
where a file name can be resolved to a file in a system independent
manner. Vicinities can even be used on "flat" file systems (which have
no directory structure) by having the vicinity express constraints on
the file name. On most systems a vicinity would be a string. All of
these procedures are file system dependent.
These procedures are provided by all implementations.
- Function: make-vicinity path
Returns the vicinity of PATH for use by `in-vicinity'.
- Function: program-vicinity
Returns the vicinity of the currently loading Scheme code. For an
interpreter this would be the directory containing source code.
For a compiled system (with multiple files) this would be the
directory where the object or executable files are. If no file is
currently loading it the result is undefined. *Warning:*
`program-vicinity' can return incorrect values if your program
escapes back into a `load'.
- Function: library-vicinity
Returns the vicinity of the shared Scheme library.
- Function: implementation-vicinity
Returns the vicinity of the underlying Scheme implementation. This
vicinity will likely contain startup code and messages and a
compiler.
- Function: user-vicinity
Returns the vicinity of the current directory of the user. On most
systems this is `""' (the empty string).
- Function: home-vicinity
Returns the vicinity of the user's "HOME" directory, the directory
which typically contains files which customize a computer
environment for a user. If scheme is running without a user (eg.
a daemon) or if this concept is meaningless for the platform, then
`home-vicinity' returns `#f'.
- Function: in-vicinity vicinity filename
Returns a filename suitable for use by `slib:load',
`slib:load-source', `slib:load-compiled', `open-input-file',
`open-output-file', etc. The returned filename is FILENAME in
VICINITY. `in-vicinity' should allow FILENAME to override
VICINITY when FILENAME is an absolute pathname and VICINITY is
equal to the value of `(user-vicinity)'. The behavior of
`in-vicinity' when FILENAME is absolute and VICINITY is not equal
to the value of `(user-vicinity)' is unspecified. For most systems
`in-vicinity' can be `string-append'.
- Function: sub-vicinity vicinity name
Returns the vicinity of VICINITY restricted to NAME. This is used
for large systems where names of files in subsystems could
conflict. On systems with directory structure `sub-vicinity' will
return a pathname of the subdirectory NAME of VICINITY.