Is there an os-independent way to atomically overwrite a file? Is there an os-independent way to atomically overwrite a file? go go

Is there an os-independent way to atomically overwrite a file?