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

Breadcrumb

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

function GzipDownloader::extractUsingExt

1 call to GzipDownloader::extractUsingExt()
GzipDownloader::extract in vendor/composer/composer/src/Composer/Downloader/GzipDownloader.php
Extract file to directory

File

vendor/composer/composer/src/Composer/Downloader/GzipDownloader.php, line 57

Class

GzipDownloader
GZip archive downloader.

Namespace

Composer\Downloader

Code

private function extractUsingExt(string $file, string $targetFilepath) : void {
    $archiveFile = gzopen($file, 'rb');
    $targetFile = fopen($targetFilepath, 'wb');
    while ($string = gzread($archiveFile, 4096)) {
        fwrite($targetFile, $string, Platform::strlen($string));
    }
    gzclose($archiveFile);
    fclose($targetFile);
}

API Navigation

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