Skip to contents

Removes a sandbox directory and all its contents. This should be called after testing is complete to free up disk space.

Usage

cleanup_sandbox(sandbox = NULL, force = TRUE)

Arguments

sandbox

Optional. A sandbox object created by setup_sandbox(). If NULL (default), cleans up the most recently created sandbox.

force

Logical. If TRUE (default), removes directory even if it contains files.

Value

Logical indicating success (invisible).

Examples

if (FALSE) { # \dontrun{
# Setup sandbox
sandbox <- setup_sandbox(c("data/mydata.rds", "code/analysis.R"))

# ... use sandbox ...

# Clean up
cleanup_sandbox(sandbox)
} # }