function drush_sitealias_site_dir_from_filename

8.0.x sitealias.inc drush_sitealias_site_dir_from_filename($site_settings_file)
6.x sitealias.inc drush_sitealias_site_dir_from_filename($site_settings_file)
7.x sitealias.inc drush_sitealias_site_dir_from_filename($site_settings_file)
3.x sitealias.inc drush_sitealias_site_dir_from_filename($site_settings_file)
4.x sitealias.inc drush_sitealias_site_dir_from_filename($site_settings_file)
5.x sitealias.inc drush_sitealias_site_dir_from_filename($site_settings_file)
master sitealias.inc drush_sitealias_site_dir_from_filename($site_settings_file)

Pull the site directory from the path to settings.php

Parameters

site_settings_file: path to settings.php

Return value

string the site directory component of the path to settings.php

2 calls to drush_sitealias_site_dir_from_filename()
drush_sitealias_build_record_from_settings_file in includes/sitealias.inc
_drush_find_local_sites_in_sites_folder in includes/sitealias.inc
Return a list of all of the local sites at the specified 'sites' folder.

File

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

Code

function drush_sitealias_site_dir_from_filename($site_settings_file) {
  return basename(dirname($site_settings_file));
}