install_ensure_config_directory($type)
Ensures that the config directory exists and is writable, or can be made so.
Parameters
string $type: Type of config directory to return. Drupal core provides 'sync'.
Return value
bool TRUE if the config directory exists and is writable.
Deprecated
in Drupal 8.1.x, will be removed before Drupal 9.0.x. Use config_get_config_directory() and file_prepare_directory() instead.
File
- core/includes/install.inc, line 534
- API functions for installing modules and themes.
Code
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); } }
Please login to continue.