fn write_new_file_with(
path: &Path,
contents: &[u8],
before_persist: impl FnOnce() -> Result<()>,
) -> Result<()>Expand description
A lock-free, durable, no-clobber file create (SP2 design §4.4). There is no sweep of leftover temp files: without a lock a sweep could delete another launch’s live temp file.