Function convenience::write_file
[−]
[src]
pub fn write_file<P: AsRef<Path>>(path: P, contents: &[u8]) -> Result<(), Error>
Writes contents
to a file at path
.
If the file doesn't exist, creates it. Otherwise, truncates the file and overwrites its previous contents, if any.