src/acdhOeaw/util/Indexer.php
private function isSkipped(DirectoryIterator $i): bool {
        $isEmptyDir = true;
        if ($i->isDir()) {
            foreach (new DirectoryIterator($i->getPathname()) as $j) {
                if (!$j->isDot()) {
                    $isEmptyDir = false;
                    break;
                }
            }
        }
        $skipDir         = (!$this->includeEmpty && ($this->depth == 0 || $isEmptyDir) || $this->flatStructure);
        $filenameInclude = preg_match($this->filter, $i->getFilename());
        $filenameExclude = strlen($this->filterNot) > 0 && preg_match($this->filterNot, $i->getFilename());
        $skipFile        = !$filenameInclude || $filenameExclude;
        return $i->isDir() && $skipDir || !$i->isDir() && $skipFile;
    }
private function isSkipped(DirectoryIterator $i): bool {
        $isEmptyDir = true;
        if ($i->isDir()) {
            foreach (new DirectoryIterator($i->getPathname()) as $j) {
                if (!$j->isDot()) {
                    $isEmptyDir = false;
                    break;
                }
            }
        }
        $skipDir         = (!$this->includeEmpty && ($this->depth == 0 || $isEmptyDir) || $this->flatStructure);
        $filenameInclude = preg_match($this->filter, $i->getFilename());
        $filenameExclude = strlen($this->filterNot) > 0 && preg_match($this->filterNot, $i->getFilename());
        $skipFile        = !$filenameInclude || $filenameExclude;
        return $i->isDir() && $skipDir || !$i->isDir() && $skipFile;
    }
private function isSkipped ( DirectoryIterator $ i ) : bool { $ isEmptyDir = true ; if ( $ i -> isDir ( ) ) { foreach ( new DirectoryIterator ( $ i -> getPathname ( ) ) as $ j ) { if ( ! $ j -> isDot ( ) ) { $ isEmptyDir = false ; break ; } } } $ skipDir = ( ! $ this -> includeEmpty && ( $ this -> depth == 0 || $ isEmptyDir ) || $ this -> flatStructure ) ; $ filenameInclude = preg_match ( $ this -> filter , $ i -> getFilename ( ) ) ; $ filenameExclude = strlen ( $ this -> filterNot ) > 0 && preg_match ( $ this -> filterNot , $ i -> getFilename ( ) ) ; $ skipFile = ! $ filenameInclude || $ filenameExclude ; return $ i -> isDir ( ) && $ skipDir || ! $ i -> isDir ( ) && $ skipFile ; }
Checks if a given file system node should be skipped during import.

@param DirectoryIterator $i file system node
@return bool
Checks if a given file system node should be skipped during import .