View source: R/safeFileRename.R
safeFileRename | R Documentation |
drop-in replacement for file.rename that correctly handles renames across filesystems on linux - copies the file from filesystem A to filesystem B - only if the copy succeeded, delete the file from filesystem B
safeFileRename(from, to)
from |
character vector giving filename or path |
to |
character vector giving filename or path |
logical vector,rv
, that is TRUE for each successful rename, FALSE elsewhere
Upon returning:
the files 'from[rv]' no longer exist, and their contents are now stored in files 'to[rv]'.
the files 'from[! rv]' and 'to[! rv]' are preserved, if they already existed, and are not created if they didn't already exist.
i.e. unsuccesful renaming leaves source and destination items as they were.
John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.