Writes only if the file still holds what the caller last read (expected; undefined means
it did not exist), so a prompt in between cannot let this overwrite an edit made meanwhile.
A change between this check and the rename remains possible but is a very small window.
Writes only if the file still holds what the caller last read (
expected; undefined means it did not exist), so a prompt in between cannot let this overwrite an edit made meanwhile. A change between this check and the rename remains possible but is a very small window.