install_ensure_config_directory($type)
Ensures that the config directory exists and is writable, or can be made so.
string $type: Type of config directory to return. Drupal core provides 'sync'.
bool TRUE if the config directory exists and is writable.
in Drupal 8.1.x, will be removed before Drupal 9.0.x. Use config_get_config_directory() and file_prepare_directory() instead.
function install_ensure_config_directory($type) { // The config directory must be defined in settings.php. global $config_directories; if (!isset($config_directories[$type])) { return FALSE; } // The logic here is similar to that used by system_requirements() for other // directories that the installer creates. else { $config_directory = config_get_config_directory($type); return file_prepare_directory($config_directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!install.inc/function/install_ensure_config_directory/8.1.x