Skip to content

Commit

Permalink
Finder::path() method matching directories and files
Browse files Browse the repository at this point in the history
For clarity, adds an example where `path()` is used to match a directory or a file.

ref api-platform/core#575 (comment)
  • Loading branch information
soyuka committed Jun 18, 2016
1 parent a01f87f commit 2e332dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/finder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@ The :method:`Symfony\\Component\\Finder\\Finder::notPath` method excludes files

$finder->notPath('other/dir');

The :method:`Symfony\\Component\\Finder\\Finder::path` method matches
both directories and files. For example, the following will match ``foo/bar.yml``
but also ``foo.yml``::

$finder->in(__DIR__)->path('foo')->name('*.yml);


File Size
~~~~~~~~~

Expand Down

0 comments on commit 2e332dd

Please sign in to comment.