Task/AnalyzeModule.php
public function getFiles($module_root_name) {
    $filepath = $this->environment->getExtensionPath('module', $module_root_name);

    //$old_dir = getcwd();
    //chdir($filepath);
    $files = scandir($filepath);

    foreach ($files as $filename) {
      $ext = substr(strrchr($filename, '.'), 1);
      if (in_array($ext, array('module', 'install', 'inc'))) {
        $module_files[] = $filepath . '/' . $filename;
      }
    }

    return $module_files;
  }
public function getFiles($module_root_name) {
    $filepath = $this->environment->getExtensionPath('module', $module_root_name);

    //$old_dir = getcwd();
    //chdir($filepath);
    $files = scandir($filepath);

    foreach ($files as $filename) {
      $ext = substr(strrchr($filename, '.'), 1);
      if (in_array($ext, array('module', 'install', 'inc'))) {
        $module_files[] = $filepath . '/' . $filename;
      }
    }

    return $module_files;
  }
public function getFiles ( $ module_root_name ) { $ filepath = $ this -> environment -> getExtensionPath ( 'module' , $ module_root_name ) ; //$old_dir = getcwd(); //chdir($filepath); $ files = scandir ( $ filepath ) ; foreach ( $ files as $ filename ) { $ ext = substr ( strrchr ( $ filename , '.' ) , 1 ) ; if ( in_array ( $ ext , array ( 'module' , 'install' , 'inc' ) ) ) { $ module_files [ ] = $ filepath . '/' . $ filename ; } } return $ module_files ; }
Helper function to get all the code files for a given module

TODO: does drush have this?

@param $module_root_name
The root name of a module, eg 'node', 'taxonomy'.

@return
A flat array of filenames.
Helper function to get all the code files for a given module