pub fn replace(
path: &Path,
write: impl FnOnce(&mut BufWriter<File>) -> Result<()>,
) -> boolExpand description
Replace path with whatever write emits, creating the directory above it
if needed. Reports whether the file was replaced; a failure anywhere leaves
the existing file untouched and no temp behind.