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.

3 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.
drush_pm_download in commands/pm/download.pm.inc
Command callback. Download Drupal core or any project.
package_handler_download_project in commands/pm/package_handler/wget.inc
Download a project.

File

includes/drush.inc, line 769
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;
  }
}