fn standard(paths: Vec<String>, b: Behavior) -> i32 {
    let sources = &paths[0..paths.len() - 1]
        .iter()
        .map(PathBuf::from)
        .collect::<Vec<_>>();
    let target = Path::new(paths.last().unwrap());

    if (target.is_file() || is_new_file_path(target)) && sources.len() == 1 {
        copy_file_to_file(&sources[0], &target.to_path_buf(), &b)
    } else {
        copy_files_into_dir(sources, &target.to_path_buf(), &b)
    }
}
/// Perform an install, given a list of paths and behavior.
///
/// Returns an integer intended as a program return code.
///
Perform an install, given a list of paths and behavior.
Returns an integer intended as a program return code.
Perform an install given a list of paths and behavior . Returns an integer intended as a program return code .
fn standard(paths: Vec<String>, b: Behavior) -> i32 {
    let sources = &paths[0..paths.len() - 1]
        .iter()
        .map(PathBuf::from)
        .collect::<Vec<_>>();
    let target = Path::new(paths.last().unwrap());
    if (target.is_file() || is_new_file_path(target)) && sources.len() == 1 {
        copy_file_to_file(&sources[0], &target.to_path_buf(), &b)
    } else {
        copy_files_into_dir(sources, &target.to_path_buf(), &b)
    }
}
fn standard ( paths : Vec < String > , b : Behavior ) -> i32 { let sources = & paths [ 0 .. paths . len ( ) - 1 ] . iter ( ) . map ( PathBuf :: from ) . collect :: < Vec < _ > > ( ) ; let target = Path :: new ( paths . last ( ) . unwrap ( ) ) ; if ( target . is_file ( ) || is_new_file_path ( target ) ) && sources . len ( ) == 1 { copy_file_to_file ( & sources [ 0 ] , & target . to_path_buf ( ) , & b ) } else { copy_files_into_dir ( sources , & target . to_path_buf ( ) , & b ) } }
Perform an install, given a list of paths and behavior.
Perform an install given a list of paths and behavior .
paths
Vec<String>
b
Behavior
paths
Vec<String>
b
Behavior