From 6d7ec3f58fe409aa0af91cd15a12508ebe9267ce Mon Sep 17 00:00:00 2001 From: Ahmed Abdou Date: Mon, 25 Mar 2019 23:48:09 +0100 Subject: [PATCH] adding ignoreVCSIgnored documentation --- components/finder.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/finder.rst b/components/finder.rst index 25cefdb2370..53da99bca7e 100644 --- a/components/finder.rst +++ b/components/finder.rst @@ -355,6 +355,15 @@ Restrict by a depth range by chaining calls or passing an array:: // same as above $finder->depth(['> 2', '< 5']); +Gitignore +~~~~~~~~~~~~~~~ + +The Finder can follow .gitignore file rules. :method:`Symfony\\Component\\Finder\\Finder::ignoreVCSIgnored`:: + + $finder->ignoreVCSIgnored(true); + +This will exclude files based on .gitignore rules as git does. + Custom Filtering ~~~~~~~~~~~~~~~~