fn _copy_subdirs(source: &Path, target: &Path) -> Result<(), InkError> {
    if target.is_dir() {
        return Err("The target directory already exists".into());
    }

    let mut paths = Vec::new();
    _find_paths(source, &mut paths)?;

    for source_path in paths {
        let source_path = source_path.strip_prefix(source).unwrap();
        let path = target.join(source_path);

        fs::create_dir_all(path.parent().unwrap())?;
    }
    Ok(())
}
/// Creates a new directory at target and copies all subdirectories from source
Creates a new directory at target and copies all subdirectories from source
Creates a new directory at target and copies all subdirectories from source
fn _copy_subdirs(source: &Path, target: &Path) -> Result<(), InkError> {
    if target.is_dir() {
        return Err("The target directory already exists".into());
    }
    let mut paths = Vec::new();
    _find_paths(source, &mut paths)?;
    for source_path in paths {
        let source_path = source_path.strip_prefix(source).unwrap();
        let path = target.join(source_path);
        fs::create_dir_all(path.parent().unwrap())?;
    }
    Ok(())
}
fn _copy_subdirs ( source : & Path , target : & Path ) -> Result < ( ) , InkError > { if target . is_dir ( ) { return Err ( " " . into ( ) ) ; } let mut paths = Vec :: new ( ) ; _find_paths ( source , & mut paths ) ? ; for source_path in paths { let source_path = source_path . strip_prefix ( source ) . unwrap ( ) ; let path = target . join ( source_path ) ; fs :: create_dir_all ( path . parent ( ) . unwrap ( ) ) ? ; } Ok ( ( ) ) }
Creates a new directory at target and copies all subdirectories from source
Creates a new directory at target and copies all subdirectories from source
source
&Path
target
&Path
source
&Path
target
&Path