protected function FeedsHTTPCache::deleteFilesStartingWith in Feeds 7.2
Deletes files from the cache directory starting with a certain string.
Parameters
string $string: The string with which the file name should start.
1 call to FeedsHTTPCache::deleteFilesStartingWith()
- FeedsHTTPCache::clear in includes/
FeedsHTTPCache.inc - Implements DrupalCacheInterface::clear().
File
- includes/
FeedsHTTPCache.inc, line 166 - Contains FeedsHTTPCache class.
Class
- FeedsHTTPCache
- Cache implementation for the Feeds HTTP cache.
Code
protected function deleteFilesStartingWith($string) {
$mask = '/^' . preg_quote($string) . '/';
$files_to_delete = file_scan_directory($this
->getCacheDir(), $mask);
foreach ($files_to_delete as $file) {
file_unmanaged_delete($file->uri);
}
}