Skip to content

Commit 4b08ee6

Browse files
[Finder docs] Add early directory prunning filter support
Co-authored-by: Alexis Lefebvre <alexislefebvre@gmail.com>
1 parent 83aaa26 commit 4b08ee6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/finder.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,12 @@ it is called with the file as a :class:`Symfony\\Component\\Finder\\SplFileInfo`
329329
instance. The file is excluded from the result set if the Closure returns
330330
``false``.
331331

332+
.. versionadded:: 6.4
333+
334+
Since Symfony 6.4, a filter can prune directories early, pass ``true`` as the second
335+
parameter for the ``filter()`` method and when the Closure returns ``false`` the deeper
336+
levels will not be traversed.
337+
332338
Sorting Results
333339
---------------
334340

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy