FileFinder
class FileFinder implements IteratorAggregate, Countable
Class FileFinder
$finder = FileFinder::create()
->files()
->name('*.php')
->notName('some.php')
->in('/path/to/project')
;
foreach($finder as $file) {
// something ......
}
Constants
ONLY_FILE |
|
ONLY_DIR |
|
IGNORE_VCS_FILES |
|
IGNORE_DOT_FILES |
|
Methods
static FileFinder
create()
No description
static FileFinder
fromArray(array $config)
No description
__construct(string $path, int $flags, bool $ignoreUnreadableDirs = false)
No description
$this
directories()
No description
$this
dirs()
No description
files()
No description
name(string $pattern)
$finder->name('*.php') $finder->name('test.php')
addNames(string|array $patterns)
No description
notName(string $pattern)
No description
addNotNames(string|array $patterns)
No description
path(string $pattern)
$finder->path('some/special/dir')
addPaths(string|array $patterns)
No description
notPath(string $pattern)
No description
addNotPaths(string|array $patterns)
No description
exclude($dirs)
No description
ignoreVCS(bool $ignoreVCS)
No description
ignoreDotFiles(bool $ignoreDotFiles)
No description
followLinks(bool $followLinks)
No description
$this
in(string|array $dirs)
No description
inDir(string|array $dirs)
alias of the in()
$this
append(mixed $iterator)
No description
int
count()
No description
bool
isFollowLinks()
No description
getIterator()
Retrieve an external iterator
current()
No description
getChildren()
No description
rewind()
No description
isRewindable()
No description
Details
at line 78
static FileFinder
create()
at line 87
static FileFinder
fromArray(array $config)
at line 419
__construct(string $path, int $flags, bool $ignoreUnreadableDirs = false)
at line 119
$this
directories()
at line 129
$this
dirs()
at line 139
FileFinder
files()
at line 153
FileFinder
name(string $pattern)
$finder->name('*.php') $finder->name('test.php')
at line 164
FileFinder
addNames(string|array $patterns)
at line 175
FileFinder
notName(string $pattern)
at line 186
FileFinder
addNotNames(string|array $patterns)
at line 199
FileFinder
path(string $pattern)
$finder->path('some/special/dir')
at line 210
FileFinder
addPaths(string|array $patterns)
at line 221
FileFinder
notPath(string $pattern)
at line 232
FileFinder
addNotPaths(string|array $patterns)
at line 243
FileFinder
exclude($dirs)
at line 254
FileFinder
ignoreVCS(bool $ignoreVCS)
at line 269
FileFinder
ignoreDotFiles(bool $ignoreDotFiles)
at line 283
FileFinder
followLinks(bool $followLinks)
at line 294
FileFinder
filter(Closure $closure)
at line 305
$this
in(string|array $dirs)
at line 317
FileFinder
inDir(string|array $dirs)
alias of the in()
at line 328
$this
append(mixed $iterator)
at line 350
int
count()
at line 358
bool
isFollowLinks()
at line 368
Iterator|SplFileInfo[]
getIterator()
Retrieve an external iterator