Finder::path()

Finder|SplFileInfo[] path(string $pattern)

Adds rules that filenames must match.

You can use patterns (delimited with / sign) or simple strings.

$finder->path('some/special/dir') $finder->path('/some\/special\/dir/') // same as above

Use only / as dirname separator.

Parameters

string $pattern A pattern (a regexp or a string)

Return Value

Finder|SplFileInfo[] The current Finder instance

See also

FilenameFilterIterator
doc_Symfony
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.