cargo_util::paths

Function write

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

Writes a file to disk.

Equivalent to std::fs::write with better error messages.