file_rename: Rename files and directories

View source: R/paths.R

file_renameR Documentation

Rename files and directories

Description

First try file.rename(). If it fails (e.g., renaming a file from one volume to another on disk is likely to fail), try file.copy() instead, and clean up the original files if the copy succeeds.

Usage

file_rename(from, to)

Arguments

from, to

Original and target paths, respectively.

Value

A logical vector (TRUE for success and FALSE for failure).


yihui/xfun documentation built on Oct. 17, 2024, 10:10 p.m.