R/files.R

Defines functions file_move

file_move <- function(file, dest)
{
  newPath <- file.path(dest, basename(file))
  if (file.copy(file, newPath)) {
    if (!file.remove(file)) {
      file.remove(newPath)
    }
    return(TRUE)
  }
  FALSE
}
BroVic/myRStuff documentation built on Jan. 31, 2024, 1:01 a.m.