fn create_dir_structure(&self, path: &Path) -> Result<(), Error> {
        for entry in WalkDir::new(&path)
            .follow_links(self.follow_links)
            .into_iter()
        {
            let entry = entry?;
            let entry_path = entry.path();
            let entry_path = Path::new(&entry_path);

            if entry_path.is_dir() && path != entry_path {
                Self::create_dir_structure(self, entry_path)?;
            } else if entry_path.is_dir() {
                let rel_location = entry_path.strip_prefix(&self.source).unwrap();
                let destination = Path::new(&self.result).join(rel_location);
                if !destination.exists() {
                    fs::create_dir(destination)?
                }
            }
        }
        Ok(())
    }
// helper fn to create directory structure in self.base_dir
helper fn to create directory structure in self.base_dir
helper fn to create directory structure in self . base_dir
fn create_dir_structure(&self, path: &Path) -> Result<(), Error> {
        for entry in WalkDir::new(&path)
            .follow_links(self.follow_links)
            .into_iter()
        {
            let entry = entry?;
            let entry_path = entry.path();
            let entry_path = Path::new(&entry_path);
            if entry_path.is_dir() && path != entry_path {
                Self::create_dir_structure(self, entry_path)?;
            } else if entry_path.is_dir() {
                let rel_location = entry_path.strip_prefix(&self.source).unwrap();
                let destination = Path::new(&self.result).join(rel_location);
                if !destination.exists() {
                    fs::create_dir(destination)?
                }
            }
        }
        Ok(())
    }
fn create_dir_structure ( & self , path : & Path ) -> Result < ( ) , Error > { for entry in WalkDir :: new ( & path ) . follow_links ( self . follow_links ) . into_iter ( ) { let entry = entry ? ; let entry_path = entry . path ( ) ; let entry_path = Path :: new ( & entry_path ) ; if entry_path . is_dir ( ) && path != entry_path { Self :: create_dir_structure ( self , entry_path ) ? ; } else if entry_path . is_dir ( ) { let rel_location = entry_path . strip_prefix ( & self . source ) . unwrap ( ) ; let destination = Path :: new ( & self . result ) . join ( rel_location ) ; if ! destination . exists ( ) { fs :: create_dir ( destination ) ? } } } Ok ( ( ) ) }
helper fn to create directory structure in self.base_dir
helper fn to create directory structure in self . base_dir
&self
path
&Path
&self
path
&Path