Skip to content

Commit f87c9e6

Browse files
committed
minor #18499 [Finder] [Finder docs] Add early directory prunning filter support (mvorisek)
This PR was merged into the 6.4 branch. Discussion ---------- [Finder] [Finder docs] Add early directory prunning filter support Refs * symfony/symfony#50877 Commits ------- 4b08ee6 [Finder docs] Add early directory prunning filter support
2 parents 3197890 + 4b08ee6 commit f87c9e6

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