Is 'file path' required in hook_menu()? I just started learning Drupal 7 Module development. In a tutorial I watched, the person said that 


  "In hook_menu(), if we have a 'file' attribute then the 'file
  path' is a must and drupal wont work if it is not declared in drupal 7."


But when I read a book, it said that 


  The 'file_path' is not required in drupal 7 provided that the file
  is present in the same directory.


As you can see, its a bit confusing. So my questions are

1) Is 'file path' required in Drupal 7 ?

2) When to use 'file path' ?

I've posted a snippet of the hook_menu implementation :

function modulename_menu() {
  $items['...'] = array(
    ....
    ....
    'file' =&gt; 'modulename.admin.inc',
    'file path' =&gt; drupal_get_path('module','modulename'),
  );
  return $items;
} 


Note : Assume that the file is present in the same modules folder
The first sentence you quoted is wrong. "file path" is not a must, if you set "file"; in fact, by default Drupal will take its value is the directory containing the module implementing the menu. If you want to use a different directory, such as drupal_get_path('module', 'mymodule') . '/includes'), then you can set "file path."

_menu_router_build() contains the following code.

// Calculate out the file to be included for each callback, if any.
if ($item['file']) {
  $file_path = $item['file path'] ? $item['file path'] : drupal_get_path('module', $item['module']);
  $item['include file'] = $file_path . '/' . $item['file'];
}


$item['module'] is set by menu_router_build() using the following code.

  foreach (module_implements('menu') as $module) {
    $router_items = call_user_func($module . '_menu');
    if (isset($router_items) &amp;&amp; is_array($router_items)) {
      foreach (array_keys($router_items) as $path) {
        $router_items[$path]['module'] = $module;
      }
      $callbacks = array_merge($callbacks, $router_items);
    }
  }


A module could implement hook_menu_alter() to alter $item['module'].