get-resource in Miscellaneous
(get-resource-> booleansectionentryvaluefile)
section: string
entry: string
value: boxed string or boxed exact integer
file=#f: path or#fGets a resource value from the resource database. The resource value is keyed on the combination of
sectionandentry. The return value is#tis a value is found,#fif it is not. The type of the value initially in thevaluebox determines the way that the resource is interpreted, andvalueis filled with a new value of the same type if one is found.If
fileis#f, platform-specific resource files are read, as determined byfind-graphical-system-pathwith'setup-file. (Under X, whenfileis#f, the user's .Xdefaults file is also read, or the file specified by the XENVIRONMENT environment variable.)The format of a resource entry depends on the platform. Windows resources use the standard .INI format. X and Mac OS X resources use the standard X resource format, where each entry consists of a
section.entryresource name, a colon, and the resource value, terminated by a newline. Section and entry names are case-sensitive.Under Windows, if
sectionis one of the following strings, thenfileis ignored, andentryis used as a resource path:In that case, the
entryargument is parsed as a resource entry path, followed by a backslash, followed by a value name. To get the ``default'' value for an entry, use the empty name. For example, the following expression gets a command line for starting a browser:(let ([b (
box"")]) (get-resource"HKEY_CLASSES_ROOT" "htmlfile\\shell\\open\\command\\" b) (unboxb))See also
write-resource.