Atomicity of file-copying/moving

Per Nordlöw via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed May 17 13:02:44 PDT 2017


On Wednesday, 17 May 2017 at 19:56:52 UTC, Per Nordlöw wrote:
> 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

Correction: should be renaming.




More information about the Digitalmars-d-learn mailing list