Remove most calls to get_all_supercache_filenames() #176
get_all_supercache_filenames() is used to get a list of index.html type
get_all_supercache_filenames() is used to get a list of index.html type files for deleting. There are a number of duplicate foreach() loops in wp-cache-phase2.php that should be rolled into one function. This patch adds wpsc_delete_files() which takes a directory and deletes any files in that directory. This goes beyond what the foreach() loops did but also checks that the directory is in the cache directory so should be safe to use. It should make it easier to cache different types of pages and maintain them using this function.
This removes all files in a particular supercache directory when deleted from the settings page, rather than just the index.html types files.
Windows changes / to \ when paths go through realpath() so we need to apply realpath to all paths when there's a comparison.