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

Breadcrumb

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

function FileDownloader::remove

@inheritDoc

Overrides DownloaderInterface::remove

3 calls to FileDownloader::remove()
FileDownloader::update in vendor/composer/composer/src/Composer/Downloader/FileDownloader.php
@inheritDoc
PathDownloader::remove in vendor/composer/composer/src/Composer/Downloader/PathDownloader.php
@inheritDoc
PathDownloader::remove in vendor/composer/composer/src/Composer/Downloader/PathDownloader.php
@inheritDoc
1 method overrides FileDownloader::remove()
PathDownloader::remove in vendor/composer/composer/src/Composer/Downloader/PathDownloader.php
@inheritDoc

File

vendor/composer/composer/src/Composer/Downloader/FileDownloader.php, line 423

Class

FileDownloader
Base downloader for files

Namespace

Composer\Downloader

Code

public function remove(PackageInterface $package, string $path, bool $output = true) : PromiseInterface {
    if ($output) {
        $this->io
            ->writeError("  - " . UninstallOperation::format($package));
    }
    $promise = $this->filesystem
        ->removeDirectoryAsync($path);
    return $promise->then(static function ($result) use ($path) : void {
        if (!$result) {
            throw new \RuntimeException('Could not completely delete ' . $path . ', aborting.');
        }
    });
}

API Navigation

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