pub fn write_if_modified_with(
    path: impl AsRef<Path>,
    io: impl FnOnce(&mut Cursor<Vec<u8>>) -> Result<()>
) -> Result<bool>
Expand description

Write the output of io(&mut output)? to path if it differed from what already existed there (if anything.)