define-moduleModule Manager Facilitydefine-root-directorydefine-relative-directoryGoTo Top

define-relative-directory   name directory &rest subdirectories[Function]

Defines a directory relative to a root or relative directory or to the directory specification of a module definition.

Package   :module-manager

Module   :module-manager

Arguments and values

name     A keyword symbol naming the relative directory
directory     The keyword symbol name of a root or relative directory or the name of a module
subdirectories     One or more strings specifying, in order, subdirectories from directory to the relative directory. (The keyword :up or :back can also be supplied in addition to any of these strings, indicating to go upward one semantic or syntactic level of directory structure, respectively.)

Root and relative directory definitions are used to isolate file-system details from module definitions. A relative directory is defined in relation to another directory definition, that is either a root directory or another relative directory (which itself is eventually associated with a root directory). If this root directory location changes, every relative directory associated with it is adjusted automatically.

The documentation string associated with a relative directory can be accessed and set by using Common Lisp's documentation generic function with the directory's name and the doc-type directory.

See also

Define a relative directory below :my-app-root named :my-tests:

  (define-relative-directory :my-tests 
    "The tests directory for My App"
    :my-app-root "tests")
Define another relative directory named :my-performance-tests below :my-tests:
  (define-relative-directory :my-performance-tests 
  "The performance-tests subdirectory for My App"
  :my-tests "performance")
Define a data directory sibling to the source directory of :my-app module:
  (define-relative-directory :my-app-data 
    "The data directory for My App"
    :my-app :up "data")

Retrieve and then modify the documentation string of the relative directory named :my-tests:

  > (documentation ':my-app-data 'directory)
  "The data directory for My App"
  > (setf (documentation ':my-app-data 'directory) 
  "The data directory for my way cool application")
  "The data directory for my way cool application"
  > (documentation ':my-app-data 'directory)
  "The data directory for my way cool application"

The GBBopen Project

define-moduleModule Manager Facilitydefine-root-directorydefine-relative-directoryGoTo Top