I am trying to generate a huge text file using C# and another process is constantly looking at the location and trying to pickup the file if available.
In order to make the file atomic below are the steps :
1 - Write to file : Filename_temp.txt
2 - Check if Filename.txt already exists then Delete
3 - Do a File.Move to the same destination
From filename : Filename_temp.txt
TO : Filename.txt
Since C# does not have a rename, I have to rely on File.Move, does this make sure the move operation will be atomic or is there another way to achieve this atomicity?