Finder
class Finder implements IteratorAggregate
Finder allows searching through directory trees using iterator.
Finder::findFiles('*.php') ->size('> 10kB') ->from('.') ->exclude('temp');
Methods
No description
Begins search for directories matching mask.
Begins search for directories matching mask.
Shows folder content prior to the folder.
No description
No description
Restricts the search using callback.
Limits recursion level.
Restricts the search by size. $operator accepts "[operator] [size] [unit]" example: >=10kB
Restricts the search by modified time. $operator accepts "[operator] [date]" example: >1978-01-23
No description
No description
Details
at line 38
__construct()
No description
at line 48
static Finder
find(string ...$masks)
Begins search for files and directories matching mask.
at line 59
static Finder
findFiles(string ...$masks)
Begins search for files matching mask.
at line 70
static Finder
findDirectories(string ...$masks)
Begins search for directories matching mask.
at line 80
Finder
files(string ...$masks)
Begins search for files matching mask.
at line 100
Finder
directories(string ...$masks)
Begins search for directories matching mask.
at line 121
Finder
in(string ...$paths)
Searches in the given folder(s).
at line 140
Finder
from(string ...$paths)
Searches recursively from the given folder(s).
at line 158
Finder
childFirst()
Shows folder content prior to the folder.
at line 165
Finder
ignoreUnreadableDirs(bool $state = true)
No description
at line 172
Finder
sortByName(bool $state = true)
No description
at line 182
Finder
and()
Starts defining a new search group.
at line 196
Finder
exclude(string ...$masks)
Restricts the search using mask.
at line 227
Finder
filter(callable $callback)
Restricts the search using callback.
at line 238
Finder
recurseFilter(callable $callback)
Restricts the search using callback.
at line 248
Finder
limitDepth(int|null $depth)
Limits recursion level.
at line 258
Finder
size(string $operator, int|null $size = null)
Restricts the search by size. $operator accepts "[operator] [size] [unit]" example: >=10kB
at line 278
Finder
date(string $operator, string|int|DateTimeInterface|null $date = null)
Restricts the search by modified time. $operator accepts "[operator] [date]" example: >1978-01-23
at line 297
array
toArray()
No description
at line 304
Generator
getIterator()
No description
Traits
Strict class for better experience.