Next: Version information, Previous: Logging functions, Up: Core API Reference [Contents][Index]
To use the functions described in this section, you will need to load
the (lepton os)
module.
This section describes some functions and variables that are useful for Scheme code that needs to behave differently depending on which operating system Lepton is running on.
The directory separator character that should be used on the host platform.
The separator-char
function is deprecated and must not be used in
the newly written code. It will be removed after version 1.10.
There is no replacement for it.
A string containing separator-char
.
The separator
function is deprecated and must not be used in
the newly written code. It will be removed after version 1.10.
Use the guile function file-name-separator-string
instead.
The character used for separating the elements in ‘PATH’-like environment variables on the host platform.
A string containing path-separator-char
.
Returns a list of symbols describing the host platform. The returned symbols may include:
Note: Previously, the function defined platform on Mac OS as ‘carbon’. Since the Carbon framework has been discontinued by Apple, the symbol is no longer used, and the platform will be determined as ‘unknown’. The Guile variable %host-type can be used instead to define the platform in this case. For example:
(string-contains %host-type "apple")Please let us know if you have a better suggestion of how to name the platform in the function.
Returns ‘#t’ if the platform description list returned by
platform
contains the symbol type, and ‘#f’
otherwise.
Returns an ordered list of directories in which to access system-wide Lepton data.
Returns an ordered list of directories in which to access system-wide Lepton configuration information.
Returns the directory in which to store user-specific Lepton data.
Returns the directory in which to store user-specific Lepton configuration information.
Returns the directory in which to store program-specific Lepton configuration information.
Recursively expands str until no more environment variables can be expanded, and return the expanded string. Environment variables are in the form ‘${VAR}’.
(expand-env-variables "${HOME}/path/to/dir")
Next: Version information, Previous: Logging functions, Up: Core API Reference [Contents][Index]