Skip to content

Commit

Permalink
Improve Finder::path code example about resulting matches
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka authored and xabbuh committed Jun 20, 2016
1 parent 1026863 commit cd28675
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/finder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit cd28675

Please sign in to comment.