R/removeAllFiles.R

Defines functions removeAllFiles.default removeAllFiles

Documented in removeAllFiles removeAllFiles.default

#' @details
#' \code{removeAllFiles} remove all entries from \code{dest}. \code{src} will
#' not be affected.
#'
#' @rdname rsync
#' @export
removeAllFiles <- function(db, ...) {
  UseMethod("removeAllFiles", db)
}

#' @rdname rsync
#' @export
removeAllFiles.default <- function(db, verbose = FALSE, ...) {
  dat <- listFiles(db, recursive = TRUE)
  entries <- dat$name
  removeFile(db, entries, verbose = verbose, ...)
}
INWTlab/rsync documentation built on April 3, 2022, 10:11 a.m.