File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -181,27 +181,29 @@ Path
181
181
~~~~
182
182
183
183
.. versionadded :: 2.2
184
- Methods ``path() `` and ``notPath() `` have been
185
- introduced in version 2.2.
184
+ The ``path() `` and ``notPath() `` methods were added in version 2.2.
186
185
187
186
Restrict files and directories by path with the
188
187
:method: `Symfony\\ Component\\ Finder\\ Finder::path ` method::
189
188
190
189
$finder->path('some/special/dir');
191
190
192
- On all platforms slash (i.e. ``/ ``) should be used as a separator.
191
+ On all platforms slash (i.e. ``/ ``) should be used as the directory separator.
193
192
194
- The ``path() `` method accepts strings or regexes ::
193
+ The ``path() `` method accepts a string or a regular expression ::
195
194
196
195
$finder->path('foo/bar');
197
196
$finder->path('/^foo\/bar/');
198
197
199
- Strings are converted into regexes by escaping slashes and adding delimiters:
198
+ Internally, strings are converted into regular expressions by escaping slashes
199
+ and adding delimiters:
200
+
201
+ .. code-block :: text
200
202
201
203
dirname ===> /dirname/
202
204
a/b/c ===> /a\/b\/c/
203
205
204
- The `` notPath() ` ` method excludes files by path::
206
+ The :method: ` Symfony \\ Component \\ Finder \\ Finder:: notPath ` method excludes files by path::
205
207
206
208
$finder->notPath('other/dir');
207
209
You can’t perform that action at this time.
0 commit comments