Filesystem: use is_dir() instead of file_exists() which is faster

this reproducible saves 1-2 seconds while running `COMPOSER_DISABLE_NETWORK=1 php
 composer/bin/composer install -vvv --profile` on the rector/rector project
main
Markus Staab 4 years ago
parent de58c5499e
commit 6552b85100

@ -131,7 +131,7 @@ class Filesystem
// clear stat cache because external processes aren't tracked by the php stat cache
clearstatcache();
if ($result && !file_exists($directory)) {
if ($result && !is_dir($directory)) {
return true;
}

Loading…
Cancel
Save