function _make_download_file

8.0.x make.download.inc _make_download_file($download, $cache_duration = DRUSH_CACHE_LIFETIME_DEFAULT)
6.x make.download.inc _make_download_file($download, $cache_duration = DRUSH_CACHE_LIFETIME_DEFAULT)
7.x make.download.inc _make_download_file($download, $cache_duration = DRUSH_CACHE_LIFETIME_DEFAULT)
5.x make.download.inc _make_download_file($download, $cache_duration = DRUSH_CACHE_LIFETIME_DEFAULT)
master make.download.inc _make_download_file($download, $cache_duration = DRUSH_CACHE_LIFETIME_DEFAULT)

Wrapper to drush_download_file().

Parameters

string $download: The url of the file to download.

int $cache_duration: The time in seconds to cache the resultant download.

Return value

string The location of the downloaded file, or FALSE on failure.

4 calls to _make_download_file()
DrushMakeProject::applyPatches in commands/make/make.project.inc
Retrieve and apply any patches specified by the makefile to this project.
DrushMakeProject::getTranslations in commands/make/make.project.inc
Retrieve translations for this project.
make_download_file in commands/make/make.download.inc
Downloads a file to the specified location.
make_get_data in commands/make/make.utilities.inc
Get data based on the source.

File

commands/make/make.download.inc, line 94
Download-specific functions for Drush Make.

Code

function _make_download_file($download, $cache_duration = DRUSH_CACHE_LIFETIME_DEFAULT) {
  if (drush_get_option('no-cache', FALSE)) {
    $cache_duration = 0;
  }

  $tmp_path = make_tmp();
  // Ensure that we aren't including the querystring when generating a filename
  // to save our download to.
  $file = basename(current(explode('?', $download, 2)));
  return drush_download_file($download, $tmp_path . '/' . $file, $cache_duration);
}