use std::fs; fn main() -> std::io::Result<()> { fs::copy("foo.txt", "bar.txt")?; Ok(()) }
The builtin function that the contents of one file to another