Next: (kracht lists), Previous: (kracht html-entities), Up: API
Asset library is an in-memory cache, a lookup dictionary that can be used for faster performance, memoization, etc. This version will read from a list of files specified with the FILES param.
To use it, you can simply call the function with a list of file paths.
Retrieve the short Git commit SHA (7 characters) of the current repository state, with surrounding whitespace trimmed. If no SHA can be determined (for example outside of a Git repository), return DEFAULT.
Undocumented procedure.
Get env VAR or return a DEFAULT value.
Equivalent to open-pipe with mode OPEN_BOTH
Equivalent to open-pipe with mode OPEN_READ
Read the entire contents of the file at PATH and return it as a string. The input port is always closed, even if an error is raised while reading.
Execute system shell command CMD via an input pipe and return the captured standard output as a string.
THUNK must be a procedure of no arguments, and FILE must be a string naming a file. The effect is unspecified if the file already exists. The file is opened for output, an output port connected to it is made the default value returned by ‘current-output-port’, and the THUNK is called with no arguments. When the THUNK returns, the port is closed and the previous default is restored. Returns the values yielded by THUNK. If an escape procedure is used to escape from the continuation of these procedures, their behavior is implementation dependent.
Undocumented procedure.
Calls THUNK and returns its output as a string.
Write the string CONTENTS to the file at PATH, replacing any previous contents. Returns the number of characters written.
Next: (kracht lists), Previous: (kracht html-entities), Up: API