Class NFinder
NFinder allows searching through directory trees using iterator.
NFinder::findFiles('*.php') ->size('> 10kB') ->from('.') ->exclude('temp');
- NObject
-
NFinder implements IteratorAggregate, Traversable
public static
NFinder
|
#
find(
mixed
$mask
)
Begins search for files matching mask and all directories. Begins search for files matching mask and all directories. Parameters$mask mixed |
public static
NFinder
|
#
findFiles(
mixed
$mask
)
Begins search for files matching mask. Begins search for files matching mask. Parameters$mask mixed |
public static
NFinder
|
#
findDirectories(
mixed
$mask
)
Begins search for directories matching mask. Begins search for directories matching mask. Parameters$mask mixed |
public
NFinder
|
#
in(
string|array
$path
)
Searchs in the given folder(s). Searchs in the given folder(s). Parameters$path string|arrayReturnsNFinder provides a fluent interface
|
public
NFinder
|
#
from(
string|array
$path
)
Searchs recursively from the given folder(s). Searchs recursively from the given folder(s). Parameters$path string|arrayReturnsNFinder provides a fluent interface
|
public
NFinder
|
#
childFirst(
)
Shows folder content prior to the folder. Shows folder content prior to the folder. ReturnsNFinder provides a fluent interface
|
public
Iterator
|
#
getIterator(
)
Returns iterator. |
public
NFinder
|
#
exclude(
mixed
$masks
)
Restricts the search using mask. Restricts the search using mask. Excludes directories from recursive traversing. Parameters$masks mixedReturnsNFinder provides a fluent interface
|
public
NFinder
|
#
filter(
callback
$callback
)
Restricts the search using callback. Restricts the search using callback. Parameters$callback callbackReturnsNFinder provides a fluent interface
|
public
NFinder
|
#
limitDepth(
int
$depth
)
Limits recursion level. Limits recursion level. Parameters$depth intReturnsNFinder provides a fluent interface
|
public
NFinder
|
#
size(
string
$operator,
int
$size = NULL
)
Restricts the search by size. Restricts the search by size. Parameters$operator string "[operator] [size] [unit]" example: >=10kB$size intReturnsNFinder provides a fluent interface
|
public
NFinder
|
#
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 mixedReturnsNFinder provides a fluent interface
|