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\DownloaderCode
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);
}