function drush_sitealias_site_get

8.0.x sitealias.inc drush_sitealias_site_get()
6.x sitealias.inc drush_sitealias_site_get()
7.x sitealias.inc drush_sitealias_site_get()
5.x sitealias.inc drush_sitealias_site_get()
master sitealias.inc drush_sitealias_site_get()

Read the tmp file where the persistent site setting is stored.

Return value

string A valid site specification.

3 calls to drush_sitealias_site_get()
drush_preflight in includes/preflight.inc
During the initialization of Drush, this is the first step where we load our configuration and commandfiles, and select the site we are going to operate on; however, we take no irreversible actions (e.g. site bootstrapping). This allows commands that…
drush_sitealias_check_arg_and_site_set in includes/sitealias.inc
Check to see if the user specified an alias in an arguement, or via site-set. If so, return the name of the alias.
drush_sitealias_check_site_env in includes/sitealias.inc

File

includes/sitealias.inc, line 2154
The site alias API.

Code

function drush_sitealias_site_get() {
  if (($filename = drush_sitealias_get_envar_filename()) && file_exists($filename)) {
    $site = file_get_contents($filename);
    return $site;
  }
  else {
    return FALSE;
  }
}