1 2 3 4 5 6 7
use crate::fs; use std::path; pub fn write_file(file: &str, text: &str) { let filepath = path::Path::new(&file).canonicalize().unwrap(); fs::write(filepath, text).expect("Could not write the file"); }