src/File/FilesystemFile.php
protected function renameCacheEntries($to) {

		if(($cachePath = $this->folder->getCachePath(TRUE))) {

			$di	= new \DirectoryIterator($cachePath);

			foreach($di as $fileinfo) {

				$filename = $fileinfo->getFilename();

				if(	$fileinfo->isDot() ||
					!$fileinfo->isFile() ||
					strpos($filename, $this->filename) !== 0
				) {
					continue;
				}

				$renamed = substr_replace($filename, $to, 0, strlen($this->filename));
				rename($fileinfo->getRealPath(), $fileinfo->getPath() . DIRECTORY_SEPARATOR . $renamed);
			}
		}
	}
protected function renameCacheEntries($to) {

		if(($cachePath = $this->folder->getCachePath(TRUE))) {

			$di	= new \DirectoryIterator($cachePath);

			foreach($di as $fileinfo) {

				$filename = $fileinfo->getFilename();

				if(	$fileinfo->isDot() ||
					!$fileinfo->isFile() ||
					strpos($filename, $this->filename) !== 0
				) {
					continue;
				}

				$renamed = substr_replace($filename, $to, 0, strlen($this->filename));
				rename($fileinfo->getRealPath(), $fileinfo->getPath() . DIRECTORY_SEPARATOR . $renamed);
			}
		}
	}
protected function renameCacheEntries ( $ to ) { if ( ( $ cachePath = $ this -> folder -> getCachePath ( TRUE ) ) ) { $ di = new \ DirectoryIterator ( $ cachePath ) ; foreach ( $ di as $ fileinfo ) { $ filename = $ fileinfo -> getFilename ( ) ; if ( $ fileinfo -> isDot ( ) || ! $ fileinfo -> isFile ( ) || strpos ( $ filename , $ this -> filename ) !== 0 ) { continue ; } $ renamed = substr_replace ( $ filename , $ to , 0 , strlen ( $ this -> filename ) ) ; rename ( $ fileinfo -> getRealPath ( ) , $ fileinfo -> getPath ( ) . DIRECTORY_SEPARATOR . $ renamed ) ; } } }
updates names of cache entries

@param string $to new filename
updates names of cache entries