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