Thank you very much for these pointers.
In order to lower the risk for proceeding unknowingly with (3) or (4),
I'll keep my post-rename tests for them (understanding that it is
still not bullet proof).
/Henrik
On Tue, Mar 1, 2011 at 11:01 PM, Prof Brian Ripley
rip...@stats.ox.ac.uk wrote:
As
Hi,
assume I have an existing file 'pathname' and I want to rename it to
'pathnameN' (which does not exist). I use:
res - file.rename(pathname, pathnameN);
Is it guaranteed that:
(1) if res == TRUE, the file now have name 'pathnameN' and there is no
file with name 'pathname'?
(2) if res ==
As the help says:
This is subject to the limitations of the OS's corresponding system
call:
E.g. on Fedora 14 'man 2 rename' says, inter alia,
'If newpath already exists it will be atomically replaced (subject to
a few conditions; see ERRORS below), so that there is no point at