PHP Class Nette\Utils\Finder

Finder::findFiles('*.php') ->size('> 10kB') ->from('.') ->exclude('temp');
Author: David Grudl
Inheritance: extends Nette\Object, implements IteratorAggregate
Mostrar archivo Open project: nette/finder Class Usage Examples

Public Methods

Method Description
__call ( $name, $args ) ******************* extension methods ****************d*g*
childFirst ( ) : self Shows folder content prior to the folder.
compare ( $l, $operator, $r ) : boolean Compares two values.
count ( ) : integer Get the number of found files and/or directories.
date ( $operator, $date = NULL ) : self Restricts the search by modified time.
exclude ( $masks ) : self Restricts the search using mask.
extensionMethod ( $name, $callback )
filter ( $callback ) : self Restricts the search using callback.
find ( $masks ) : self Begins search for files matching mask and all directories.
findDirectories ( $masks ) : self Begins search for directories matching mask.
findFiles ( $masks ) : self Begins search for files matching mask.
from ( $paths ) : self Searchs recursively from the given folder(s).
getIterator ( ) : Iterator Returns iterator.
in ( $paths ) : self Searchs in the given folder(s).
limitDepth ( $depth ) : self Limits recursion level.
size ( $operator, $size = NULL ) : self Restricts the search by size.

Private Methods

Method Description
buildIterator ( $path ) : Iterator Returns per-path iterator.
buildPattern ( $masks ) : string Converts Finder pattern to regular expression.
select ( $masks, $type ) : self Creates filtering group by mask & type selector.

Method Details

__call() public method

******************* extension methods ****************d*g*
public __call ( $name, $args )

childFirst() public method

Shows folder content prior to the folder.
public childFirst ( ) : self
return self

compare() public static method

Compares two values.
public static compare ( $l, $operator, $r ) : boolean
return boolean

count() public method

Get the number of found files and/or directories.
public count ( ) : integer
return integer

date() public method

Restricts the search by modified time.
public date ( $operator, $date = NULL ) : self
return self

exclude() public method

Excludes directories from recursive traversing.
public exclude ( $masks ) : self
return self

extensionMethod() public static method

public static extensionMethod ( $name, $callback )

filter() public method

Restricts the search using callback.
public filter ( $callback ) : self
return self

find() public static method

Begins search for files matching mask and all directories.
public static find ( $masks ) : self
return self

findDirectories() public static method

Begins search for directories matching mask.
public static findDirectories ( $masks ) : self
return self

findFiles() public static method

Begins search for files matching mask.
public static findFiles ( $masks ) : self
return self

from() public method

Searchs recursively from the given folder(s).
public from ( $paths ) : self
return self

getIterator() public method

Returns iterator.
public getIterator ( ) : Iterator
return Iterator

in() public method

Searchs in the given folder(s).
public in ( $paths ) : self
return self

limitDepth() public method

Limits recursion level.
public limitDepth ( $depth ) : self
return self

size() public method

Restricts the search by size.
public size ( $operator, $size = NULL ) : self
return self