copyFile: Copy a file using Robocopy on Windows and rsync on linux

Description Usage Arguments Author(s)

Description

This will copy an individual file faster Robocopy in Windows and rsync in Linux. The function will default to file.copy (which is slow).

Usage

1
2
copyFile(from = NULL, to = NULL, useRobocopy = TRUE, overwrite = TRUE,
  delDestination = FALSE, create = TRUE, silent = FALSE)

Arguments

from

The source file

to

The new file

useRobocopy

For Windows, this will use a system call to Robocopy which appears to be much faster than the internal file.copy function. Uses /MIR flag.

overwrite

Passed to file.copy

delDestination

Logical, whether the destination should have any files deleted, if they don't exist in the source. This is /purge

create

Passed to checkLazyDir

silent

Should a progress be printed

Author(s)

Eliot McIntire


PredictiveEcology/lazyR documentation built on May 8, 2019, 3:10 p.m.