You are here

function taxonomy_xml_flush_file_cache in Taxonomy import/export via XML 7

Same name and namespace in other branches
  1. 6.2 taxonomy_xml.module \taxonomy_xml_flush_file_cache()

Deletes ALL cached files.

Accessed in the 'advanced' section of the import form.

1 string reference to 'taxonomy_xml_flush_file_cache'
taxonomy_xml_import_form in ./taxonomy_xml.admin.inc
Builds the import form.

File

./taxonomy_xml.module, line 697
Make it possible to import and export taxonomies as XML documents.

Code

function taxonomy_xml_flush_file_cache() {

  #$cachedir = file_directory_path() . '/url_cache';
  $cachedir = drupal_realpath('public://url_cache');
  $file_list = file_scan_directory($cachedir, '/.*/');
  foreach ($file_list as $filepath => $file_info) {
    unlink($filepath);
  }
  return "Deleted all files within {$cachedir}";
}