
15 Apr
2021
15 Apr
'21
4:23 a.m.
Hi Josh, the fastest and safest way is to create the temporary file in the directory of the final location and then move the file to its final name. This way you ensure that the temporary file is always on the same device or partition as the final file and therefore a move is always possible. And it's the safest, because a move is an atomic operation - which copy isn't - and therefore other processes will never see a partially updated file. Greetings, Daniel