diff --git a/components/finder.rst b/components/finder.rst index 2a12460031a..81bc96c41a5 100644 --- a/components/finder.rst +++ b/components/finder.rst @@ -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 ~~~~~~~~~