protected function appendIterator(\Closure $callback = null)
    {
        $iterator = new \AppendIterator();

        $paths = (array) parent::getArrayCopy();

        $clousre = function ($path) use ($callback, $iterator) {
            $iterator->append($callback($path));
        };

        foreach ($this as $path) {
            if ($this->isSubdir($path)) {
                continue;
            }

            $clousre($path);
        }

        return $iterator;
    }
protected function appendIterator(\Closure $callback = null)
    {
        $iterator = new \AppendIterator();

        $paths = (array) parent::getArrayCopy();

        $clousre = function ($path) use ($callback, $iterator) {
            $iterator->append($callback($path));
        };

        foreach ($this as $path) {
            if ($this->isSubdir($path)) {
                continue;
            }

            $clousre($path);
        }

        return $iterator;
    }
protected function appendIterator ( \ Closure $ callback = null ) { $ iterator = new \ AppendIterator ( ) ; $ paths = ( array ) parent :: getArrayCopy ( ) ; $ clousre = function ( $ path ) use ( $ callback , $ iterator ) { $ iterator -> append ( $ callback ( $ path ) ) ; } ; foreach ( $ this as $ path ) { if ( $ this -> isSubdir ( $ path ) ) { continue ; } $ clousre ( $ path ) ; } return $ iterator ; }
Append all paths' iterator into an OuterIterator.

@param  \Closure $callback Contains the logic of how to get iterator from path object.

@return  \AppendIterator  Appended iterators.

@since  2.0
Append all paths iterator into an OuterIterator .