8000 Improve `Finder::path` code example about resulting matches · symfony/symfony-docs@cd28675 · GitHub
[go: up one dir, main page]

Skip to content

Commit cd28675

Browse files
soyukaxabbuh
authored andcommitted
Improve Finder::path code example about resulting matches
1 parent 1026863 commit cd28675

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/finder.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,10 @@ Path
206206
Restrict files and directories by path with the
207207
:method:`Symfony\\Component\\Finder\\Finder::path` method::
208208

209-
$finder->path('some/special/dir');
209+
// matches files that contain "data" anywhere in their paths (files or directories)
210+
$finder->path('data');
211+
// for example this will match data/*.xml and data.xml if they exist
212+
$finder->path('data')->name('*.xml');
210213

211214
On all platforms slash (i.e. ``/``) should be used as the directory separator.
212215

0 commit comments

Comments
 (0)
0