Example #1
0
 /**
  * Get instance of DirectoryScanner with filter options applied
  *
  * @param bool $filter
  * @return \TheSeer\DirectoryScanner\DirectoryScanner
  */
 public function getScanner($filter = TRUE)
 {
     $scanner = new \TheSeer\DirectoryScanner\DirectoryScanner();
     if ($filter) {
         $scanner->setIncludes($this->config->getInclude());
         $scanner->setExcludes($this->config->getExclude());
     }
     if ($this->config->isFollowSymlinks()) {
         $scanner->setFlag(\FilesystemIterator::FOLLOW_SYMLINKS);
     }
     return $scanner;
 }
Example #2
0
 /**
  * Get instance of DirectoryScanner with filter options applied
  *
  * @param bool $filter
  * @return \TheSeer\DirectoryScanner\IncludeExcludeFilterIterator
  */
 public function getScanner($filter = TRUE)
 {
     $scanner = new \TheSeer\DirectoryScanner\DirectoryScanner();
     if ($filter) {
         $scanner->setIncludes($this->config->getInclude());
         $scanner->setExcludes($this->config->getExclude());
     }
     if ($this->config->isFollowSymlinks()) {
         $scanner->setFollowSymlinks(TRUE);
     }
     return $scanner;
 }