Skip to main content
added working code
Source Link
sareed
  • 833
  • 4
  • 15

I am looking into it a little more but for starters does dpm() show the correct value for $dir? Also, according to the documentation the trailing slash on $dir is not supposed to be there.

code that is working for me:

$dir = DRUPAL_ROOT . '/sites/all/libraries';
$files = file_scan_directory($dir, '/.*\.js/');
dpm($files);

I am looking into it a little more but for starters does dpm() show the correct value for $dir? Also, according to the documentation the trailing slash on $dir is not supposed to be there.

I am looking into it a little more but for starters does dpm() show the correct value for $dir? Also, according to the documentation the trailing slash on $dir is not supposed to be there.

code that is working for me:

$dir = DRUPAL_ROOT . '/sites/all/libraries';
$files = file_scan_directory($dir, '/.*\.js/');
dpm($files);
Source Link
sareed
  • 833
  • 4
  • 15

I am looking into it a little more but for starters does dpm() show the correct value for $dir? Also, according to the documentation the trailing slash on $dir is not supposed to be there.