function drush_sitealias_local_site_path

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

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


$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/
Return the array of paths where alias files are searched for.
_drush_sitealias_cache_alias in includes/
Add an empty record for the specified alias name
_drush_sitealias_get_record in includes/
This is a continuation of drush_sitealias_get_record, above. It is not intended to be called directly.


includes/, line 318
The site alias API.


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;