You are here

function _module_builder_check_hook_data in Module Builder 6.2

Same name and namespace in other branches
  1. 7 includes/common.inc \_module_builder_check_hook_data()

Check hook data is available in storage file.

This allows us to check things are okay at an early stage.

Parameters

$directory: (optional) The directory to look in for processed data.

Return value

TRUE is file exists, FALSE if not.

1 call to _module_builder_check_hook_data()
module_builder_callback_build in drush/module_builder.drush.inc
Module builder drush command callback.

File

includes/common.inc, line 130
common.inc Stuff needed both by module and drush command.

Code

function _module_builder_check_hook_data($directory = NULL) {
  if (!isset($directory)) {

    //$directory = file_create_path(variable_get('module_builder_hooks_directory', 'hooks'));
    $directory = _module_builder_get_hooks_directory();
  }
  return file_exists("{$directory}/hooks_processed.php");
}