Function renvy::write_file
source · [−]Expand description
Writes a String data contents
into the file at filepath
and returns
the result as std::io::Result
.
You would use this function to write the deserialized settings back to the file after merging.
Writing a String into a file
This shows how to write a String
which returns a std::io::Result
.
if let Ok(_) = renvy::write_file(&"/path/to/my/.env", deserialized_contents) {
println!("File written successfully.");
}