Next: , Previous: Error handling, Up: Top


10 Miscellaneous additional functionality

FIXME: Add discussion of run-shell-command? Others?

ASDF includes several additional features that are generally useful for system definition and development. These include:

— Function: system-relative-pathname system name &key type

It's often handy to locate a file relative to some system. The system-relative-pathname function meets this need. It takes two arguments: the name of a system and a relative pathname. It returns a pathname built from the location of the system's source file and the relative pathname. For example

          > (asdf:system-relative-pathname 'cl-ppcre #p"regex.data")
          #P"/repository/other/cl-ppcre/regex.data"
     

Instead of a pathname, you can provide a symbol or a string, and optionally a keyword argument type. The arguments will then be interpreted in the same way as pathname specifiers for components. See Pathname specifiers.

— Function: system-source-directory system-designator

ASDF does not provide a turnkey solution for locating data (or other miscellaneous) files that are distributed together with the source code of a system. Programmers can use system-source-directory to find such files. Returns a pathname object. The system-designator may be a string, symbol, or ASDF system object.