From cd28675db4562ed57a17bb7066aabbf3c6857ccc Mon Sep 17 00:00:00 2001 From: soyuka Date: Sun, 19 Jun 2016 21:24:04 +0200 Subject: [PATCH] Improve `Finder::path` code example about resulting matches --- components/finder.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/finder.rst b/components/finder.rst index 8f587d050c2..5224ef48986 100644 --- a/components/finder.rst +++ b/components/finder.rst @@ -206,7 +206,10 @@ Path Restrict files and directories by path with the :method:`Symfony\\Component\\Finder\\Finder::path` method:: - $finder->path('some/special/dir'); + // matches files that contain "data" anywhere in their paths (files or directories) + $finder->path('data'); + // for example this will match data/*.xml and data.xml if they exist + $finder->path('data')->name('*.xml'); On all platforms slash (i.e. ``/``) should be used as the directory separator.