Function copy_file

Source
pub fn copy_file(path: &Path, output_path: &Path) -> Result<(), Error>
Expand description

复制文件

§Examples

 
fn main() -> Result<(), io::Error> {
    let path = Path::new("./test/copy_origion");
    let output_path = Path::new("./test/copy_currnet");
    copy_file(&path, &output_path)?;
    Ok(())
}