X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=inline;f=vendor%2Fconsolidation%2Fannotated-command%2Fsrc%2FCommandFileDiscovery.php;fp=vendor%2Fconsolidation%2Fannotated-command%2Fsrc%2FCommandFileDiscovery.php;h=06489fb08679a86e9837b6da4f114ff14e130385;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=a409c0b821ce83e1382f68c1441f9df258efbe9c;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/vendor/consolidation/annotated-command/src/CommandFileDiscovery.php b/vendor/consolidation/annotated-command/src/CommandFileDiscovery.php index a409c0b82..06489fb08 100644 --- a/vendor/consolidation/annotated-command/src/CommandFileDiscovery.php +++ b/vendor/consolidation/annotated-command/src/CommandFileDiscovery.php @@ -40,6 +40,8 @@ class CommandFileDiscovery protected $includeFilesAtBase = true; /** @var integer */ protected $searchDepth = 2; + /** @var bool */ + protected $followLinks = false; public function __construct() { @@ -101,6 +103,16 @@ class CommandFileDiscovery return $this; } + /** + * Specify that the discovery object should follow symlinks. By + * default, symlinks are not followed. + */ + public function followLinks($followLinks = true) + { + $this->followLinks = $followLinks; + return $this; + } + /** * Set the list of search locations to examine in each directory where * command files may be found. This replaces whatever was there before. @@ -325,6 +337,10 @@ class CommandFileDiscovery $finder->exclude($item); } + if ($this->followLinks) { + $finder->followLinks(); + } + return $finder; }