File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,27 @@ Exclude directories from matching with the
109
109
The :method: `Symfony\\ Component\\ Finder\\ Finder::ignoreUnreadableDirs `
110
110
method was introduced in Symfony 2.3.
111
111
112
+ Note that the excluded paths provided are relative to the `in() ` directories. For
113
+ example if you have:
114
+
115
+ /path/to/project
116
+ \- - A/
117
+ |-- a0
118
+ |-- a1
119
+ \- - B
120
+ |-- b0
121
+ \-- b1
122
+
123
+ And do the following:
124
+
125
+ Finder::create()
126
+ ->files()
127
+ ->in('/path/to/project)
128
+ ->exclude('A/B')
129
+ ;
130
+
131
+ Then the finder will collect the files `a0 ` and `a1 `.
132
+
112
133
It's also possible to ignore directories that you don't have permission to read::
113
134
114
135
$finder->ignoreUnreadableDirs()->in(__DIR__);
You can’t perform that action at this time.
0 commit comments