pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> Result<()>
Writes a file to disk.
Equivalent to std::fs::write with better error messages.
std::fs::write