You are here

function drush_xmlsitemap_custom_scan in XML sitemap 7.2

Scan a directory for static files to include via custom XML sitemap links.

1 string reference to 'drush_xmlsitemap_custom_scan'
xmlsitemap_custom_drush_command in xmlsitemap_custom/xmlsitemap_custom.drush.inc
Implements hook_drush_command().

File

xmlsitemap_custom/xmlsitemap_custom.drush.inc, line 30
Drush integration functions for the xmlsitemap_custom module.

Code

function drush_xmlsitemap_custom_scan($directory, $mask) {
  module_load_include('scan.inc', 'xmlsitemap_custom');
  drush_print(dt('About to scan @directory with @mask.', array(
    '@directory' => $directory,
    '@mask' => $mask,
  )));
  $results = xmlsitemap_custom_scan_directories(array(
    $directory => $mask,
  ));
  drush_print(dt('Scanned @directory: added @add_count and removed @delete_count.', array(
    '@directory' => $directory,
    '@add_count' => count($results[$directory]['add']),
    '@delete_count' => count($results[$directory]['delete']),
  )));
}