file.rename overwrites existing target (PR#14065)
Full_Name: Jens Oehlschl?gel Version: 2.10.0 OS: Windows XP Professional Submission from: (NULL) (85.181.158.112) file.rename() will successfully rename file a to b - even if b exists already. Though the documentation does not state what file.rename() will do in this case, I guess the expected behaviour is to fail and return FALSE. Kind regards Jens Oehlschl?gel
cat("a\n", file="a.txt")
cat("b\n", file="b.txt")
file.rename("a.txt","b.txt")
[1] TRUE
readLines("b.txt")
[1] "a"
version
_ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor 10.0 year 2009 month 10 day 26 svn rev 50208 language R version.string R version 2.10.0 (2009-10-26)