It looks like renameTo on Windows is not necessarily atomic, in particular
if the destination file exists there can be problems. MoveFileEx is
supposedly the way to go and should give better results.
Comments
EVALUATION
This feature has been addressed by the new file system API defined by JSR-203.
16-02-2009
EVALUATION
In WinNTFileSystem and Win32FileSystem, we call the C Runtime _wrename() and rename() functions respectively. Although it appears that MoveFileExW does not provide any guarantees over the rename(), there are good reasons to not go through the C Runtime on windows if it's not necessary.
Note that MoveFileExW does not exist for win9x so we'd have to change that code to use MoveFile.
26-10-2005
EVALUATION
Will investigate this for the next release.
###@###.### 2004-05-10