Instead of delete and later replace, how about create unique-named temp new 
file then immediately rename to target name?
If rename is atomic then nothing could ever get lost.

Reply via email to