6.8 API for Finding Installation Directories
The
setup/dirs library provides several procedures for locating
installation directories:
Returns a path to the installation’s main "collects" directory, or
#f if none can be found. A #f result is likely only
in a stand-alone executable that is distributed without libraries.
Returns a path to the user-specific "collects" directory; the
directory indicated by the returned path may or may not exist.
Returns a list of paths to installation
"collects"
directories, including the result of
find-collects-dir.
These directories are normally included in the result of
(current-library-collection-paths), but a
PLTCOLLECTS setting or change to the parameter may cause
them to be omitted. Any other path in
(current-library-collection-paths) is treated as
user-specific. The directories indicated by the returned paths may
or may not exist.
Returns a path to the installation’s
"etc" directory, which
contains configuration and package information—
including
configuration of some of the other directories (see
Installation Configuration and Search Paths).
A
#f result indicates that no configuration directory
is available.
Returns a path to the installation’s
collection links file. The file indicated by the
returned path may or may not exist.
Returns a path to the user’s
collection
links file. The file indicated by the returned path may or may not
exist.
Returns a list of paths to installation
collection links files that are search in
order. (Normally, the result includes the result of
(find-links-file), which is where new installation-wide
links are installed by
raco link or
links.) The
files indicated by the returned paths may or may not exist.
Returns a path to the directory containing packages with
installation scope; the directory indicated by the returned path may
or may not exist.
Returns a path to the directory containing packages with
user-specific scope for installation name vers; the directory indicated by
the returned path may or may not exist.
Returns a list of paths to the directories containing packages in
installation scope. (Normally, the result includes the result of
(find-pkgs-dir), which is where new packages are installed
by
raco pkg install.) The directories indicated by the returned
paths may or may not exist.
Returns a path to the installation’s "doc" directory.
The result is #f if no such directory is available.
Returns a path to a user-specific "doc" directory. The directory
indicated by the returned path may or may not exist.
Returns a list of paths to search for documentation, not including
documentation stored in individual collections. Unless it is
configured otherwise, the result includes any non-
#f result of
(find-doc-dir) and
(find-user-doc-dir)—
but the latter is
included only if the value of the
use-user-specific-search-paths
parameter is
#t.
Returns a path to the installation’s "lib" directory, which contains
libraries and other build information. The result is #f if no such
directory is available.
Returns a path to a user-specific "lib" directory; the directory
indicated by the returned path may or may not exist.
Changed in version 6.1.1.4 of package base: Dropped (find-dll-dir)
from the set of paths to
explicitly include in the
default.
Returns a path to the directory that contains DLLs for use with the
current executable (e.g., "libracket.dll" on Windows).
The result is #f if no such directory is available, or if no
specific directory is available (i.e., other than the platform’s normal
search path).
Returns a path to the
installation’s "share" directory, which contains installed
packages and other platform-independent files. The result is
#f if no such directory is available.
Returns a path to a user-specific "share" directory; the directory
indicated by the returned path may or may not exist.
Returns a path to the installation’s "include" directory, which
contains ".h" files for building Racket extensions and embedding
programs. The result is #f if no such directory is available.
Returns a path to a user-specific "include" directory; the
directory indicated by the returned path may or may not exist.
Returns a path to the installation’s executable directory, where the
stand-alone Racket executable resides. The result is #f if no
such directory is available.
Returns a path to the installation’s executable directory, where the
stand-alone GRacket executable resides. The result is #f if no such
directory is available.
Returns a path to the user’s executable directory; the directory
indicated by the returned path may or may not exist.
Returns a path to the user’s executable directory for graphical
programs; the directory indicated by the returned path may or may
not exist.
Returns a path to the installation’s directory ".desktop"
files (for Unix). The result is #f if no such directory
exists.
Returns a path to the user’s directory for ".desktop" files
(for Unix); the directory indicated by the returned path may or may
not exist.
Returns a path to the installation’s man-page directory. The result is
#f if no such directory exists.
Returns a path to the user’s man-page directory; the directory
indicated by the returned path may or may not exist.
Returns a string that is used by the documentation system, augmented
with a version and search-key query, for remote documentation links.
Returns #f or a string for a root URL to be used as an
alternative to opening a local file for documentation. A
non-#f configuration means that DrRacket, for example,
performs keyword searches for documentation via the specified URL
instead of from locally installed documentation.
Added in version 6.0.1.6 of package base.
Returns a string
that identifies an installation build, which can be used to augment
the Racket version number to more specifically identify the
build. An empty string is normally produced for a release build.
The result is #f if no build stamp is available.
Returns #t if this installation uses
absolute path names for executable and library references,
#f otherwise.