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\InstallerCode
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;
}