I doubt that only a rename happens, even more I am sure that not.

What happens when you write a file in-place:

When happens if you write to a temp file (like GIO does)

Yes, it's more complicated, but the only extra writes are meta-data about the file, it is not written twice. It's not "write to temp then write again to original", and it's not a backup either (although a backup is not more greedy in writes either, it's almost the exact same thing but the backup is not deleted).

Yes, this requires twice the amount of free space during the write operation, because you do not remove the old data before the new one is fully written, but when the operation is finished it uses the same amount -- and again, doesn't write twice.

Footnotes

  1. actually with SSDs it's highly unlikely it'll be written at the same place, but the visible behavior is the same.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/repo-discussions/3697/comments/7623269@github.com>