Methods |
public
|
in(string ...$directory): static
Get an instance that iterates over entries in the given directories
Get an instance that iterates over entries in the given directories
|
#
|
public
|
files(): static
Get an instance that only returns files, not directories
Get an instance that only returns files, not directories
The default behaviour is to return files and directories.
|
#
|
public
|
directories(): static
Get an instance that only returns directories, not files
Get an instance that only returns directories, not files
The default behaviour is to return files and directories.
|
#
|
public
|
directoriesFirst(): static
Get an instance that returns directories before their children
Get an instance that returns directories before their children
This is the default behaviour.
|
#
|
public
|
directoriesLast(): static
Get an instance that returns directories after their children
Get an instance that returns directories after their children
The default behaviour is to return directories before their children.
|
#
|
public
|
recurse(): static
Get an instance that recurses into directories
Get an instance that recurses into directories
This is the default behaviour.
|
#
|
public
|
doNotRecurse(): static
Get an instance that does not recurse into directories
Get an instance that does not recurse into directories
The default behaviour is to recurse into directories.
|
#
|
public
|
exclude(string|(callable(SplFileInfo $file, string $path, int $depth): bool) $value): static
Get an instance that does not return entries that match a regular
expression or satisfy a callback
Get an instance that does not return entries that match a regular
expression or satisfy a callback
Regular expressions are tested against:
- pathname (all entries)
- pathname with trailing
/ (directory entries)
- pathname with leading
/ (all entries if pathname is relative)
- pathname with leading and trailing
/ (directory entries if pathname
is relative)
Pathnames are relative after calling {@see relative()}.
|
#
|
public
|
include(string|(callable(SplFileInfo $file, string $path, int $depth): bool) $value): static
Get an instance that only returns entries that match a regular expression
or satisfy a callback
Get an instance that only returns entries that match a regular expression
or satisfy a callback
The default behaviour is to return all entries.
Regular expressions are tested against:
- pathname (all entries)
- pathname with trailing
/ (directory entries)
- pathname with leading
/ (all entries if pathname is relative)
- pathname with leading and trailing
/ (directory entries if pathname
is relative)
Pathnames are relative after calling {@see relative()}.
|
#
|
public
|
relative(): static
Get an instance where entries to return are matched by pathname relative
to the directory being iterated over
Get an instance where entries to return are matched by pathname relative
to the directory being iterated over
The default behaviour is to use full pathnames, starting with directory
names passed to {@see in()}, when matching entries.
|
#
|
public
|
notRelative(): static
Get an instance where entries to return are matched by full pathname,
starting with the name of the directory being…
Get an instance where entries to return are matched by full pathname,
starting with the name of the directory being iterated over
This is the default behaviour.
|
#
|
public
|
count(): int
Get the number of entries the instance would return
Get the number of entries the instance would return
Implements
|
#
|
public
|
getFirstWith($key, $value, bool $strict = false)
Get the first element in the iterator with the given value at the given
key, or null if no such element is found
Get the first element in the iterator with the given value at the given
key, or null if no such element is found
Implements
|
#
|