function _make_download_file

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

Wrapper to drush_download_file().


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/
Retrieve and apply any patches specified by the makefile to this project.
DrushMakeProject::getTranslations in commands/make/
Retrieve translations for this project.
make_download_file in commands/make/
Downloads a file to the specified location.
make_get_data in commands/make/
Get data based on the source.


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


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);