On Tuesday, 16 May 2017 at 10:57:08 UTC, FreeSlave wrote:

Not sure about renaming but copying is not atomic on Posix because it does not handle interruption by signal. I opened issue about that https://issues.dlang.org/show_bug.cgi?id=17296

The standard way is to copy the source to a temporary file on the same file system as the target file followed by hardlinking the temporary to the target file. If an error occurs during copying you either retry or abort. That should be atomic.

Reply via email to