Class Finder
Finder allows searching through directory trees using iterator.
Finder::findFiles('*.php')
->size('> 10kB')
->from('.')
->exclude('temp');
-
Object
-
Finder
implements
IteratorAggregate
Methods summary
public static
Finder
|
#
find( mixed $mask )
Begins search for files matching mask and all directories.
Begins search for files matching mask and all directories.
Parameters
Returns
|
public static
Finder
|
#
findFiles( mixed $mask )
Begins search for files matching mask.
Begins search for files matching mask.
Parameters
Returns
|
public static
Finder
|
#
findDirectories( mixed $mask )
Begins search for directories matching mask.
Begins search for directories matching mask.
Parameters
Returns
|
public
Finder
|
#
in( string|array $path )
Searchs in the given folder(s).
Searchs in the given folder(s).
Parameters
Returns
|
public
Finder
|
#
from( string|array $path )
Searchs recursively from the given folder(s).
Searchs recursively from the given folder(s).
Parameters
Returns
|
public
Finder
|
#
childFirst( )
Shows folder content prior to the folder.
Shows folder content prior to the folder.
Returns
|
public
Iterator
|
#
getIterator( )
Returns iterator.
Returns
Implementation of
|
public
Finder
|
#
exclude( mixed $masks )
Restricts the search using mask. Excludes directories from recursive
traversing.
Restricts the search using mask. Excludes directories from recursive
traversing.
Parameters
Returns
|
public
Finder
|
#
filter( callable $callback )
Restricts the search using callback.
Restricts the search using callback.
Parameters
Returns
|
public
Finder
|
#
limitDepth( integer $depth )
Limits recursion level.
Parameters
Returns
|
public
Finder
|
#
size( string $operator, integer $size = NULL )
Restricts the search by size.
Restricts the search by size.
Parameters
- $operator
string "[operator] [size] [unit]" example: >=10kB
- $size
integer
Returns
|
public
Finder
|
#
date( string $operator, mixed $date = NULL )
Restricts the search by modified time.
Restricts the search by modified time.
Parameters
- $operator
string "[operator] [date]" example: >1978-01-23
- $date
mixed
Returns
|
public static
boolean
|
#
compare( mixed $l, mixed $operator, $r )
Compares two values.
Parameters
- $l
mixed
- $operator
mixed
- $r
Returns
boolean
|