Finder::ignoreDotFiles()

Finder|SplFileInfo[] ignoreDotFiles(bool $ignoreDotFiles) Excludes "hidden" directories and files (starting with a dot). Parameters bool $ignoreDotFiles Whether to exclude "hidden" files or not Return Value Finder|SplFileInfo[] The current Finder instance See also ExcludeDirectoryFilterIterator

Finder::getIterator()

Iterator|SplFileInfo[] getIterator() Returns an Iterator for the current Finder configuration. This method implements the IteratorAggregate interface. Return Value Iterator|SplFileInfo[] An iterator Exceptions LogicException if the in() method has not been called

Finder::files()

Finder|SplFileInfo[] files() Restricts the matching to files only. Return Value Finder|SplFileInfo[] The current Finder instance

Finder::followLinks()

Finder|SplFileInfo[] followLinks() Forces the following of symlinks. Return Value Finder|SplFileInfo[] The current Finder instance

Finder::filter()

Finder|SplFileInfo[] filter(Closure $closure) Filters the iterator with an anonymous function. The anonymous function receives a \SplFileInfo and must return false to remove files. Parameters Closure $closure An anonymous function Return Value Finder|SplFileInfo[] The current Finder instance See also CustomFilterIterator

Finder::exclude()

Finder|SplFileInfo[] exclude(string|array $dirs) Excludes directories. Parameters string|array $dirs A directory path or an array of directories Return Value Finder|SplFileInfo[] The current Finder instance See also ExcludeDirectoryFilterIterator

Finder::create()

static Finder create() Creates a new Finder. Return Value Finder A new Finder instance

Finder::date()

Finder|SplFileInfo[] date(string $date) Adds tests for file dates (last modified). The date must be something that strtotime() is able to parse: $finder->date('since yesterday'); $finder->date('until 2 days ago'); $finder->date('> now - 2 hours'); $finder->date('>= 2005-10-15'); Parameters string $date A date range string Return Value Finder|SplFileInfo[] The current Finder instance See also strtotime DateRangeFilterIterator DateComparator

Finder::depth()

Finder|SplFileInfo[] depth(int $level) Adds tests for the directory depth. Usage: $finder->depth('> 1') // the Finder will start matching at level 1. $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point. Parameters int $level The depth level expression Return Value Finder|SplFileInfo[] The current Finder instance See also DepthRangeFilterIterator NumberComparator

Finder::directories()

Finder|SplFileInfo[] directories() Restricts the matching to directories only. Return Value Finder|SplFileInfo[] The current Finder instance