How to programmatically clear/refresh module file cache? I'm maintaining a module, and have reworked the file structure of the module to make it more... modular.

In the update functions, some of the new files are referenced, but Drupal isn't aware of the new files until the cache has been cleared. The files are included in the .info file.

Please can someone tell me how to get Drupal to refresh its list of the files in this module?

Thanks,

[Side note - quite surprised that hooks and cache aren't available as tags!]
Add a MYMODULE.install file to your module. In there implement hook_update_N to flush all caches. When others update your module, and then do database updates, Drupal will pick up this hook and flushes the cache and your new files will be recognized.

/**
 * Pick up new files.
 */
function MYMODULE_update_7100(&amp;$sandbox) {
  drupal_flush_all_caches();
}