Learn R Programming

R.utils (version 2.12.3)

copyDirectory: Copies a directory

Description

Copies a directory.

Usage

# S3 method for default
copyDirectory(from, to=".", ..., private=TRUE, recursive=TRUE)

Value

Returns (invisibly) a character

vector of pathnames copied.

Arguments

from

The pathname of the source directory to be copied.

to

The pathname of the destination directory.

...

Additional arguments passed to file.copy(), e.g. overwrite.

private

If TRUE, files (and directories) starting with a period is also copied, otherwise not.

recursive

If TRUE, subdirectories are copied too, otherwise not.

Author

Henrik Bengtsson

Details

Note that this method does not use copyFile() to copy the files, but file.copy().