function _drush_is_url

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

Check whether the given path is just a url or a local path

Parameters

string $url:

Return value

boolean TRUE if the path does not contain a schema:// part.

2 calls to _drush_is_url()
DrushMakeProject::preprocessLocalFileUrl in commands/make/make.project.inc
Rewrite relative URLs and file:/// URLs
drush_download_file in includes/drush.inc
Download a file using wget, curl or file_get_contents, or via download cache.

File

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

Code

function _drush_is_url($url) {
  return parse_url($url, PHP_URL_SCHEME) !== NULL;
}