tauri_utils

Function write_if_changed

Source
pub fn write_if_changed<P, C>(path: P, content: C) -> Result<()>
where P: AsRef<Path>, C: AsRef<[u8]>,
Expand description

Write the file only if the content of the existing file (if any) is different.

This will always write unless the file exists with identical content.