setup_filesystem
creates the necessary folder structure and optionally clears
old reports. This is a convenience function that combines create_filesystem
and clear_old_reports
.
See also
create_filesystem()
, clear_old_reports()
which this function wraps.
Examples
# Create folders in a temporary directory
folders <- list(
internal = file.path(tempdir(), "internal"),
public = file.path(tempdir(), "public"),
settings = file.path(tempdir(), "settings")
)
setup_filesystem(folders)
#> $internal
#> [1] "/tmp/Rtmp8A6pxn/internal"
#>
#> $public
#> [1] "/tmp/Rtmp8A6pxn/public"
#>
#> $settings
#> [1] "/tmp/Rtmp8A6pxn/settings"
#>
unlink(unlist(folders, use.names = FALSE), recursive = TRUE)