function _module_builder_check_settings in Module Builder 5
Same name and namespace in other branches
- 6.2 includes/common.inc \_module_builder_check_settings()
- 7 includes/common.inc \_module_builder_check_settings()
Create a directory to store hook files if it does not exist.
This logic blatantly ripped off from image.module -- thanks James! :)
1 call to _module_builder_check_settings()
- module_builder_page_input in ./
module_builder.module - Module form: 'input' step. Collect module data.
File
- ./
module_builder.module, line 226 - Builds scaffolding for custom modules.
Code
function _module_builder_check_settings() {
// sanity check. need to verify /files exists before we do anything. see http://drupal.org/node/367138
$files = file_create_path();
file_check_directory($files, FILE_CREATE_DIRECTORY);
// check hooks directory exists or create it
$hooks_path = file_create_path(variable_get('module_builder_hooks_directory', 'hooks'));
file_check_directory($hooks_path, FILE_CREATE_DIRECTORY, 'module_builder_hooks_directory');
}