protected function detectDirectoryDescendants()
    {
        $descendants = [];

        foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->getPath())) as $file) {
            if ($file->isDir() && ! in_array($file->getBasename(), array('.', '..'))) {
                $resource = new DirectoryResource($file, $this->files);

                $descendants[$resource->getKey()] = $resource;
            } elseif ($file->isFile()) {
                $resource = new FileResource($file, $this->files);

                $descendants[$resource->getKey()] = $resource;
            }
        }

        return $descendants;
    }
protected function detectDirectoryDescendants()
    {
        $descendants = [];

        foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->getPath())) as $file) {
            if ($file->isDir() && ! in_array($file->getBasename(), array('.', '..'))) {
                $resource = new DirectoryResource($file, $this->files);

                $descendants[$resource->getKey()] = $resource;
            } elseif ($file->isFile()) {
                $resource = new FileResource($file, $this->files);

                $descendants[$resource->getKey()] = $resource;
            }
        }

        return $descendants;
    }
protected function detectDirectoryDescendants ( ) { $ descendants = [ ] ; foreach ( new RecursiveIteratorIterator ( new RecursiveDirectoryIterator ( $ this -> getPath ( ) ) ) as $ file ) { if ( $ file -> isDir ( ) && ! in_array ( $ file -> getBasename ( ) , array ( '.' , '..' ) ) ) { $ resource = new DirectoryResource ( $ file , $ this -> files ) ; $ descendants [ $ resource -> getKey ( ) ] = $ resource ; } elseif ( $ file -> isFile ( ) ) { $ resource = new FileResource ( $ file , $ this -> files ) ; $ descendants [ $ resource -> getKey ( ) ] = $ resource ; } } return $ descendants ; }
Detect the descendant resources of the directory.

@return array
Detect the descendant resources of the directory .