elFinder\elFinderVolumeDriver::rmTmb PHP Method

rmTmb() protected method

Remove thumbnail, also remove recursively if stat is directory
Author: Dmitry (dio) Levashov
Author: Naoki Sawada
Author: Troex Nevelin
protected rmTmb ( string $stat ) : void
$stat string file stat
return void
    protected function rmTmb($stat)
    {
        if ($stat['mime'] === 'directory') {
            foreach ($this->_scandir($this->decode($stat['hash'])) as $p) {
                $name = $this->_basename($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();
            }
        }
    }