Copy A File To Another Location In Rust

July 2023
use std::fs;

fn main() -> std::io::Result<()> {
    fs::copy("foo.txt", "bar.txt")?;  
    Ok(())
}
end of line

References

The builtin function that the contents of one file to another