View source: R/misc_recursive_copy.R
misc_recursive_copy | R Documentation |
Recursively copying directories and subdirectories.
misc_recursive_copy(source_dir, target_dir, force = FALSE)
source_dir |
A character string. The path to the directory to be copied. |
target_dir |
A character string. The target path. |
force |
A boolean. If |
This function has no return value.
if (interactive()) {
d1 <- file.path(tempdir(), "folder1")
d2 <- file.path(d1, "folder2")
d3 <- file.path(tempdir(), "new_folder")
f1 <- file.path(d1, "file.one")
dir.create(d2, recursive = TRUE)
file.create(f1)
misc_recursive_copy(d1, d3)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.