ImageManager::_delFile PHP Метод

_delFile() публичный Метод

Delete the relative file, and any thumbnails.
public _delFile ( string $relative ) : boolean
$relative string the relative file.
Результат boolean true if deleted, false otherwise.
    function _delFile($relative)
    {
        $fullpath = Files::makeFile($this->getBaseDir(), $relative);
        //check that the file is an image
        if ($this->config['validate_images'] == true) {
            if (!is_array($this->getImageInfo($fullpath))) {
                return false;
            }
            //hmmm not an Image!!???
        }
        $thumbnail = $this->getThumbName($fullpath);
        if (Files::delFile($fullpath)) {
            return Files::delFile($thumbnail);
        } else {
            return false;
        }
    }