fn change_many(&mut self, path: &PathBuf) -> Result<()> {
        let mut change_many = || -> Result<()> {
            // Change the children first
            for entry in path.read_dir()? {
                let path = entry?.path();

                // Dig through directories
                if path.is_file() {
                    self.change_one(&path)?;
                } else if path.is_dir() {
                    self.change_many(&path)?;
                }
            }

            // Change the parent last
            self.change_one(path)?;

            return Ok(());
        };

        return if let Err(err) = change_many() {
            self.write_error("Cannot access", path, &err)
        } else {
            Ok(())
        };
    }
/// Changes all entries under the given directory and writes all errors.
Changes all entries under the given directory and writes all errors.
Changes all entries under the given directory and writes all errors .
fn change_many(&mut self, path: &PathBuf) -> Result<()> {
        let mut change_many = || -> Result<()> {
            // Change the children first
            for entry in path.read_dir()? {
                let path = entry?.path();
                // Dig through directories
                if path.is_file() {
                    self.change_one(&path)?;
                } else if path.is_dir() {
                    self.change_many(&path)?;
                }
            }
            // Change the parent last
            self.change_one(path)?;
            return Ok(());
        };
        return if let Err(err) = change_many() {
            self.write_error("Cannot access", path, &err)
        } else {
            Ok(())
        };
    }
fn change_many ( & mut self , path : & PathBuf ) -> Result < ( ) > { let mut change_many = | | -> Result < ( ) > { // Change the children first for entry in path . read_dir ( ) ? { let path = entry ? . path ( ) ; // Dig through directories if path . is_file ( ) { self . change_one ( & path ) ? ; } else if path . is_dir ( ) { self . change_many ( & path ) ? ; } } // Change the parent last self . change_one ( path ) ? ; return Ok ( ( ) ) ; } ; return if let Err ( err ) = change_many ( ) { self . write_error ( " " , path , & err ) } else { Ok ( ( ) ) } ; }
Changes all entries under the given directory and writes all errors.
Changes all entries under the given directory and writes all errors .
&mut self
path
&PathBuf