You are here

function advagg_get_all_files in Advanced CSS/JS Aggregation 7.2

Get all CSS/JS advagg files.

Parameters

array $options: Array of options to pass along to file_scan_directory().

Return value

array Array of css and js files.

4 calls to advagg_get_all_files()
advagg_delete_empty_aggregates in ./advagg.cache.inc
Scan CSS/JS advagg dir and remove that file if it is empty.
advagg_delete_orphaned_aggregates in ./advagg.cache.inc
Scan CSS/JS advagg dir and remove file if there is no associated db record.
advagg_delete_stale_aggregates in ./advagg.cache.inc
Scan CSS/JS advagg dir and remove that file if atime is grater than 30 days.
advagg_remove_all_aggregated_files in ./advagg.cache.inc
Remove all files from the advagg CSS/JS directories.

File

./advagg.cache.inc, line 224
Advanced CSS/JS aggregation module.

Code

function advagg_get_all_files(array $options = array()) {
  list($css_path, $js_path) = advagg_get_root_files_dir();
  $options += array(
    'nomask' => '/(\\.\\.?|CVS|\\.gz|\\.br)$/',
  );

  // Get a list of files.
  $css_files = file_scan_directory($css_path[0], '/.*/', $options);
  $js_files = file_scan_directory($js_path[0], '/.*/', $options);
  return array(
    $css_files,
    $js_files,
  );
}