[][src]Function rust_code_analysis::write_file

pub fn write_file(path: &PathBuf, data: &[u8]) -> Result<()>

Writes data to a file.

Examples

use std::path::PathBuf;

use rust_code_analysis::write_file;

let path = PathBuf::from("foo.txt");
let data: [u8; 4] = [0; 4];
write_file(&path, &data).unwrap();