9.6 API for Reading "info.rkt" Files
procedure
(get-info collection-names [ #:namespace namespace])
→
(or/c (symbol? [(-> any)] . -> . any) false/c) collection-names : (listof string?) namespace : (or/c namespace? #f) = #f
procedure
(get-info/full path [#:namespace namespace])
→
(or/c (symbol? [(-> any)] . -> . any) false/c) path : path-string? namespace : (or/c namespace? #f) = #f
The get-info/full function returns #f if there is no "info.rkt" (or "info.ss") file in the directory. If there is a "info.rkt" (or "info.ss") file that has the wrong shape (i.e., not a module using setup/infotab or (lib "infotab.rkt" "setup")), or if the "info.rkt" file fails to load, then an exception is raised. If the "info.rkt" file loaded, get-info/full returns the get-info file. If the "info.rkt" file does not exist, then get-info/full does the same checks for the "info.rkt" file, either raising an exception or returning the get-info function from the "info.rkt" file.
The "info.rkt" (or "info.ss") module is loaded into namespace if it is not #f, or a private, weakly-held namespace otherwise.
procedure
(find-relevant-directories syms [mode]) → (listof path?)
syms : (listof symbol?)
mode : (or/c 'preferred 'all-available 'no-planet) = 'preferred
The result is in a canonical order (sorted lexicographically by directory name), and the paths it returns are suitable for providing to get-info/full.
If mode is specified, it must be either
'preferred (the default), 'all-available, or no-planet. If
mode is 'all-available, find-relevant-collections
returns all installed directories whose info files contain the
specified symbols—
No matter what mode is specified, if more than one collection has the same name, find-relevant-directories will only search the one that occurs first in a search that through the directories of current-library-collection-paths. Collection links from the installation-wide collection links file are cached with the installation’s main "collects" directory, and links from the user-specific collection links file are cached with the user-specific directory (build-path (find-system-path 'addon-dir) (version) "collects").
procedure
(find-relevant-directory-records syms key)
→ (listof directory-record?) syms : (listof symbol?) key : (or/c 'preferred 'all-available)
struct
(struct directory-record (maj min spec path syms) #:extra-constructor-name make-directory-record) maj : integer? min : integer? spec : any/c path : path? syms : (listof symbol?)
procedure