{"version":"2.1.251","anchor":"write-and-notebookedit-re-check-the-file-just-before-writing","canonical_anchor":"write-and-notebookedit-re-check-the-file-just-before-writing","heading":"Write and NotebookEdit re-check the file just before writing","tier":"notice","area":"File Tools","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.251\/e\/write-and-notebookedit-re-check-the-file-just-before-writing","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.251","markdown":"### Write and NotebookEdit re-check the file just before writing\n\nWrite and NotebookEdit re-read the file right before writing to avoid clobbering changes.\n\n**What**\n\nBoth tools now hold an open handle, read the current contents and re-check them immediately before the write lands, narrowing the window in which a file could change between being read and being overwritten.\n\n**Details**\n\n- the handle is closed once the write completes\n- applies to every Write and NotebookEdit call, with no setting involved\n\n**Evidence**\n\n`recheckBeforeWrite`\n\n- Area: File Tools\n- Tier: You'll notice\n- Useful: 4\/5\n- Signal: 3\/5"}