function install_ensure_config_directory in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/includes/install.inc \install_ensure_config_directory()
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.
3 calls to install_ensure_config_directory()
- drupal_install_config_directories in core/
includes/ install.inc - Creates the config directory and ensures it is operational.
- install_begin_request in core/
includes/ install.core.inc - Begins an installation request, modifying the installation state as needed.
- KernelTestBase::prepareConfigDirectories in core/
modules/ simpletest/ src/ KernelTestBase.php - Create and set new configuration directories.
File
- core/
includes/ install.inc, line 531 - 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;
}
else {
$config_directory = config_get_config_directory($type);
return file_prepare_directory($config_directory, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
}
}