function drush_download_file_name

8.0.x drush.inc drush_download_file_name($url)
6.x drush.inc drush_download_file_name($url)
7.x drush.inc drush_download_file_name($url)
master drush.inc drush_download_file_name($url)

Helper function to determine name of cached file.

4 calls to drush_download_file_name()
drush_download_file in includes/drush.inc
Download a file using wget, curl or file_get_contents, or via download cache.
package_handler_download_project in commands/pm/package_handler/wget.inc
Download a project.
ReleaseInfo::clearCached in lib/Drush/UpdateService/ReleaseInfo.php
Delete cached update service file of a project.
StatusInfoDrush::lastCheck in lib/Drush/UpdateService/StatusInfoDrush.php
Returns time of last check of available updates.

File

includes/drush.inc, line 802
The drush API implementation and helpers.

Code

function drush_download_file_name($url) {
  if ($cache_dir = drush_directory_cache('download')) {
    $cache_name = str_replace(array(':', '/', '?', '='), '-', $url);
    return $cache_dir . "/" . $cache_name;
  }
  else {
    return FALSE;
  }
}