Skip to content

Commit

Permalink
Match multiple filenames using wildcard (*.csv) notation
Browse files Browse the repository at this point in the history
  • Loading branch information
Arni Magnusson committed May 19, 2017
1 parent 58039cd commit 5a85a20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions R/cp.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#' Copy files, overwriting existing files if necessary, and returning the result
#' invisibly.
#'
#' @param from source file names.
#' @param from source file names. Multiple filenames can be matched using
#' wildcard notation, such as \code{*.csv} to copy all CSV files.
#' @param to destination file names, or directory.
#'
#' @return
Expand All @@ -28,5 +29,5 @@

cp <- function(from, to)
{
invisible(file.copy(from, to, overwrite=TRUE))
invisible(file.copy(Sys.glob(from), to, overwrite=TRUE))
}
3 changes: 2 additions & 1 deletion man/cp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5a85a20

Please sign in to comment.