public function isExcludedDirectory($directory)
    {
        foreach ($this->getExcludedDirectories() as $pattern) {
            if (Str::is($pattern, $directory)) return true;
        }

        return false;
    }