function drush_sitealias_local_site_path

8.0.x sitealias.inc drush_sitealias_local_site_path($alias_record)
6.x sitealias.inc drush_sitealias_local_site_path($alias_record)
7.x sitealias.inc drush_sitealias_local_site_path($alias_record)
3.x sitealias.inc drush_sitealias_local_site_path($alias_record)
4.x sitealias.inc drush_sitealias_local_site_path($alias_record)
5.x sitealias.inc drush_sitealias_local_site_path($alias_record)
master sitealias.inc drush_sitealias_local_site_path($alias_record)

Return the full path to the site directory of the given alias record.

Parameters

$alias_record: The alias record

Return value

The path to the site directory of the associated alias record, or NULL if the record is not a local site.

3 calls to drush_sitealias_local_site_path()
drush_sitealias_alias_path in includes/sitealias.inc
Return the array of paths where alias files are searched for.
_drush_sitealias_cache_alias in includes/sitealias.inc
Add an empty record for the specified alias name
_drush_sitealias_get_record in includes/sitealias.inc
This is a continuation of drush_sitealias_get_record, above. It is not intended to be called directly.

File

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

Code

function drush_sitealias_local_site_path($alias_record) {
  $result = NULL;

  if (isset($alias_record['uri']) && isset($alias_record['root']) && !isset($alias_record['remote-host'])) {
    $result = realpath($alias_record['root'] . '/sites/' . drush_sitealias_uri_to_site_dir($alias_record['uri']));
  }

  return $result;
}