Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks whether a file or directory exists
file_exists(string $filename): bool
    protected function hasApplicableFontFile()

    {

        if (
is_string($this->file)) {

            return 
file_exists($this->file);

        }



        return 
false;
        $this->extension array_key_exists('extension'$info) ? $info['extension'] : null;

        
$this->filename array_key_exists('filename'$info) ? $info['filename'] : null;



        if (
file_exists($path) && is_file($path)) {

            
$this->mime finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path);

        }
    {

        
$path $this->basePath();



        if (
file_exists($path) && is_file($path)) {

            return 
filesize($path);

        }

        
    public function initFromPath($path)

    {

        if ( ! 
file_exists($path)) {

            throw new 
NotReadableException(

                
"Unable to find file ({$path})."

            
);
                    foreach ($config->get('imagecache::paths') as $path) {


                        
$image_path $path.'/'.str_replace('..'''$filename);

                        if (
file_exists($image_path) && is_file($image_path)) {

                            break;

                        } else {

                            
$image_path false;