Check if thumbnail with given name exists.

@param  string $filename
@return boolean
487863
public function exists($filename)
    {
        return $this->file->storage->exists($this->file->path($filename));
    }
357237
public function fileExists($filename)
    {
        if ($this->mediaDirectory->isFile($filename)) {
            return true;
        } else {
            return $this->coreFileStorageDatabase->saveFileToFilesystem(
                $this->mediaDirectory->getAbsolutePath($filename)
            );
        }
    }
506673
public static function canOpenArchive($fileName)
    {
        self::checkRequirements();

        $type = self::detectArchiveType($fileName);
        if ($type !== false && self::canOpenType($type)) {
            return true;
        }

        return false;
    }
1008331
public function exists($filename, $directory = null)
    {
        $cache_path = $this->config->get('cache_path');

        if (is_null($directory)) {
            $path = $cache_path.$this->config->get('object_dir').$filename.'.cache';
        } else {
            $path = $cache_path.$directory.$filename.'.cache';
        }

        return (bool) file_exists($path);
    }
125131
protected function isPhpFilename(string $filename) : bool
    {
        $extension = pathinfo($filename, PATHINFO_EXTENSION);
        return (strtolower($extension) == 'php');
    }
702131
public function exists(string $name): bool
    {
        if ($this->processes->has($name)) {
            $process = $this->processes->get($name);
            if (Process::kill($process['pid'], 0) === false) {
                $this->processes->forget($name);
                $this->processStoreToFile();

                return false;
            }

            return true;
        }

        return false;
    }
1006203
public static function isVcsFile($fileName)
    {
        foreach (self::$vcsPatterns as $pattern) {
            if (strpos($fileName, $pattern) !== false) {
                return true;
            }
        }
        return false;
    }
1335616
protected function isValidFilename($filename)
    {
        $extension = strtolower(File::get_file_extension($filename));

        // Validate true if within the list of allowed extensions
        $allowed = $this->getAllowedExtensions();
        if ($allowed) {
            return in_array($extension, $allowed);
        }

        // If no extensions are configured, fallback to global list
        $globalList = File::getAllowedExtensions();
        if (in_array($extension, $globalList)) {
            return true;
        }

        // Only admins can bypass global rules
        return !File::config()->apply_restrictions_to_admin && Permission::check('ADMIN');
    }
1173244
protected function validateCache($fileName)
    {
        $hash = $this->getHash($fileName);
        if (!file_exists($fileName) || !isset($this->cachedFiles[$hash])) {
            return false;
        }
        
        $fileChecksum = md5_file($fileName);
        $cachedChecksum = $this->cachedFiles[$hash]['checksum'];
        
        if ($fileChecksum != $cachedChecksum) {
            return false;
        }
        
        return true;
    }
1200256
public static function exists($dirName)
    {
        $theme = static::load($dirName);
        $path = $theme->getPath();

        return File::isDirectory($path);
    }
116757
public function exists($filename)
    {
        $listing = $this->listDirectoryContents();

        $dirname_info = array_filter($listing, function ($item) use ($filename) {
            return $item['name'] === $filename;
        });

        return count($dirname_info) !== 0;
    }
707565
public function isFilePathExistWithFallback($filename)
    {
        $emailPath = $this->getOutputFolder() . DIRECTORY_SEPARATOR . $filename;
        $archivePath = $this->getArchiveFolder() . DIRECTORY_SEPARATOR . $filename;
        return is_file($emailPath) ? true : (is_file($archivePath) ? true : false);
    }
1175481
protected function shouldBeExecutable($filename)
    {
        foreach ($this->config->getExecutableFiles() as $exFile) {
            if ($filename === $exFile) {
                return true;
            }
        }
        return false;
    }
971078
public function template_exists($filename)
    {
        if (!is_array($this->template_dir)) {
            return file_exists($this->template_dir . DIRECTORY_SEPARATOR . $filename);
        } else {
            foreach ($this->template_dir as $tpl_dir) {
                if (file_exists($tpl_dir . DIRECTORY_SEPARATOR . $filename)) {
                    return true;
                }
            }

            return false;
        }
    }
572106
public static function check($filename)
    {
        if (!$filename = static::path($filename)) {
            return null;
        }

        if (!file_exists($filename)) {
            return null;
        }

        return filemtime($filename);
    }
1221018
public function exist($keyName) : bool
    {
        # double check
        return
            $this->get($keyName, true) !== true
            && $this->get($keyName, false) !== false;
    }
1021494
public function validExt($filename){
        $exts = $this->config['ext'];
        $ext = $this->getExtension($filename);
        if(array_search($ext,$exts)===false){
            return false;
        }else{
            return true;
        }


    }