Utilities for Manipulating Directories
in-this-directory
in-new-directory
keep-new-directories?
7.7

Utilities for Manipulating Directories

Dave Herman
and Sam Tobin-Hochstadt <samth@cs.indiana.edu>

This package provides forms for managing what directory code is run in. It is particularly useful for unit testing.

syntax

(in-this-directory body-form ...+)

An expression form that evaluates each body-form with the current-directory parameterized to the directory containing the module in which the expression appears.

syntax

(in-new-directory dir-expr body-form ...+)

An expression form that creates the directory dir-expr and evaluates each body-form with the current-directory parameterized to the new directory. If keep-new-directories? is #f, the new directory is completely erased, including all of its contents, after evaluation terminates.

value

keep-new-directories? : (parameter/c boolean?)

Should in-new-directory allow created directories to persist after completing?