{"size": 1223, "ext": "scrbl", "max_stars_repo_path": "in-new-directory.scrbl", "max_stars_repo_name": "samth/in-new-directory", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "in-new-directory.scrbl", "max_issues_repo_name": "samth/in-new-directory", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "in-new-directory.scrbl", "max_forks_repo_name": "samth/in-new-directory", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 39.4516129032, "max_line_length": 101, "alphanum_fraction": 0.7563368765}
#lang scribble/doc

@require[scribble/manual
         scribble/eval
         scribble/basic
         (for-label file/in-new-directory)]

@title[#:tag "top"]{Utilities for Manipulating Directories}
@declare-exporting[file/in-new-directory]

@author["Dave Herman"
        @author+email["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.


@defform[(in-this-directory body-form ...+)]{
An expression form that evaluates each @scheme[body-form] with the @scheme[current-directory]
@scheme[parameterize]d to the directory containing the module in which the expression appears.}

@defform[(in-new-directory dir-expr body-form ...+)]{
An expression form that creates the directory @scheme[dir-expr] and evaluates each @scheme[body-form]
with the @scheme[current-directory] @scheme[parameterize]d to the new directory. If
@scheme[keep-new-directories?] is @scheme[#f], the new directory is completely erased, including all
of its contents, after evaluation terminates.}

@defthing[keep-new-directories? (parameter/c boolean?)]{
Should @scheme[in-new-directory] allow created directories to persist after completing?}

