pub fn write_file(path: &str, contents: &str) -> Result<(), String>
Write a string to a file, creating it if it doesn’t exist or truncating it.