pub fn write<C: AsRef<[u8]>>(path: &str, contents: C) -> Result<()>
Write a slice as the entire contents of a file.