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

Breadcrumb

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

function SelfUpdateCommand::cleanBackups

1 call to SelfUpdateCommand::cleanBackups()
SelfUpdateCommand::execute in vendor/composer/composer/src/Composer/Command/SelfUpdateCommand.php

File

vendor/composer/composer/src/Composer/Command/SelfUpdateCommand.php, line 499

Class

SelfUpdateCommand
@author Igor Wiedler <igor@wiedler.ch> @author Kevin Ran <kran@adobe.com> @author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Composer\Command

Code

protected function cleanBackups(string $rollbackDir, ?string $except = null) : void {
    $finder = $this->getOldInstallationFinder($rollbackDir);
    $io = $this->getIO();
    $fs = new Filesystem();
    foreach ($finder as $file) {
        if ($file->getBasename(self::OLD_INSTALL_EXT) === $except) {
            continue;
        }
        $file = (string) $file;
        $io->writeError('<info>Removing: ' . $file . '</info>');
        $fs->remove($file);
    }
}

API Navigation

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