Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LibraryInstaller.php

function LibraryInstaller::isInstalled

@inheritDoc

Overrides InstallerInterface::isInstalled

File

vendor/composer/composer/src/Composer/Installer/LibraryInstaller.php, line 79

Class

LibraryInstaller
Package installation manager.

Namespace

Composer\Installer

Code

public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package) {
    if (!$repo->hasPackage($package)) {
        return false;
    }
    $installPath = $this->getInstallPath($package);
    if (Filesystem::isReadable($installPath)) {
        return true;
    }
    if (Platform::isWindows() && $this->filesystem
        ->isJunction($installPath)) {
        return true;
    }
    if (is_link($installPath)) {
        if (realpath($installPath) === false) {
            return false;
        }
        return true;
    }
    return false;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal