misc_recursive_copy {kdry}R Documentation

misc_recursive_copy

Description

Recursively copying directories and subdirectories.

Usage

misc_recursive_copy(source_dir, target_dir, force = FALSE)

Arguments

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 FALSE (the default) a dialog is prompted to ask the user if the directories should be copied recursively. If TRUE, the dialog is not prompted and the source_dir is copied directly to target_dir.

Value

This function has no return value.

Examples

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)
}

[Package kdry version 0.0.2 Index]