WordPress at a glance
function is not described

wp_cache_clean_legacy_files() WPSCache 1.0

No Hooks.

Return

Null. Nothing.

Usage

wp_cache_clean_legacy_files( $dir, $file_prefix );

Code of wp_cache_clean_legacy_files() WPSCache 1.7.1

<?php
function wp_cache_clean_legacy_files( $dir, $file_prefix ) {
	global $wpdb;

	$dir = trailingslashit( $dir );
	if ( @is_dir( $dir . 'meta' ) == false )
		return false;

	if ( $handle = @opendir( $dir ) ) {
		$curr_blog_id = is_multisite() ? get_current_blog_id() : false;

		while ( false !== ( $file = readdir( $handle ) ) ) {
			if ( is_file( $dir . $file ) == false || $file == 'index.html' ) {
				continue;
			}

			if ( strpos( $file, $file_prefix ) !== false ) {
				if ( strpos( $file, '.html' ) ) {
					// delete old WPCache files immediately
					@unlink( $dir . $file);
					@unlink( $dir . 'meta/' . str_replace( '.html', '.meta', $file ) );
				} else {
					$meta = json_decode( wp_cache_get_legacy_cache( $dir . 'meta/' . $file ), true );
					if (  $curr_blog_id && $curr_blog_id !== (int)$meta['blog_id'] ) {
						continue;
					}
					@unlink( $dir . $file);
					@unlink( $dir . 'meta/' . $file);
				}
			}
		}
		closedir($handle);
	}
}