protected function rmTmb($stat) {
		if ($stat['mime'] === 'directory') {
			foreach ($this->scandirCE($this->decode($stat['hash'])) as $p) {
				@set_time_limit(30);
				$name = $this->basenameCE($p);
				$name != '.' && $name != '..' && $this->rmTmb($this->stat($p));
			}
		} else if (!empty($stat['tmb']) && $stat['tmb'] != "1") {
			$tmb = $this->tmbPath.DIRECTORY_SEPARATOR.$stat['tmb'];
			file_exists($tmb) && @unlink($tmb);
			clearstatcache();
		}
	}
protected function rmTmb($stat) {
		if ($stat['mime'] === 'directory') {
			foreach ($this->scandirCE($this->decode($stat['hash'])) as $p) {
				@set_time_limit(30);
				$name = $this->basenameCE($p);
				$name != '.' && $name != '..' && $this->rmTmb($this->stat($p));
			}
		} else if (!empty($stat['tmb']) && $stat['tmb'] != "1") {
			$tmb = $this->tmbPath.DIRECTORY_SEPARATOR.$stat['tmb'];
			file_exists($tmb) && @unlink($tmb);
			clearstatcache();
		}
	}
protected function rmTmb ( $ stat ) { if ( $ stat [ 'mime' ] === 'directory' ) { foreach ( $ this -> scandirCE ( $ this -> decode ( $ stat [ 'hash' ] ) ) as $ p ) { @ set_time_limit ( 30 ) ; $ name = $ this -> basenameCE ( $ p ) ; $ name != '.' && $ name != '..' && $ this -> rmTmb ( $ this -> stat ( $ p ) ) ; } } else if ( ! empty ( $ stat [ 'tmb' ] ) && $ stat [ 'tmb' ] != "1" ) { $ tmb = $ this -> tmbPath . DIRECTORY_SEPARATOR . $ stat [ 'tmb' ] ; file_exists ( $ tmb ) && @ unlink ( $ tmb ) ; clearstatcache ( ) ; } }
Remove thumbnail, also remove recursively if stat is directory

@param  string  $stat  file stat
@return void
@author Dmitry (dio) Levashov
@author Naoki Sawada
@author Troex Nevelin
Remove thumbnail also remove recursively if stat is directory