in reply to Re^3: Writing to a file atomically without renaming
in thread Writing to a file atomically without renaming

I think it can be done with three files: the target, a "log" file and a temporary:
  • Comment on Re^4: Writing to a file atomically without renaming