Skip to main content

write_if_changed

Function write_if_changed 

Source
pub fn write_if_changed(path: &Path, code: impl AsRef<[u8]>) -> Result<bool>
Expand description

Writes code to path (creating its directory) unless it’s already there: unchanged files keep their mtime, so builds don’t redo work. Whether it wrote.