Martin Buchholz wrote:
:
- using Path.moveTo is more likely to be atomic, so that
a concurrent process is less likely to find the jar being updated
missing.
(Alan: is there a better way to do the common task of replacing a file
with its transformed output?)
The moveTo method does have the ATOMIC_MOVE option for cases where you
require it to be atomic but I don't think it is needed here. The
transform into a second file and replacing the original seems fine, and
probably the safest in that the original isn't trashed if something goes
wrong.
-Alan.