Skip to main content

write

Function write 

Source
pub fn write(root: &Path, artifacts: &[Artifact]) -> Result<Vec<PathBuf>, Error>
Expand description

Write every artifact under root, creating the directory. Returns every artifact’s path.

A file whose bytes are already the artifact’s is left alone, so its modification time says when it last changed rather than when it was last generated; any other is written to a temporary sibling and renamed over the target, so a reader never sees half a file and an interrupted run leaves the old one intact.