1
0
Fork 0

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
pull/9615/head
Markus Staab 2021-01-16 22:03:52 +01:00
parent de58c5499e
commit 6552b85100
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}