Check file exists.

@param string $filepath

@return boolean
165222
public function checkFileExists($filepath)
	{
		if (!$this->checkPathExists(dirname($filepath))) {
			return false;
		}

		if (!is_file($filepath)) {
			return false;
		}

		return true;
	}
414909
public function pathExists()
    {
        $path = $this->getPath();
        return !empty($path) && @file_exists($path) && @is_dir($path);
    }
941218
public function existsOnDFS( $filePath )
    {
        if ( file_exists( $this->makeDFSPath( $filePath ) ) )
        {
            return true;
        }

        // Verify that mount point is still there
        $filePathDir = substr( $filePath, 0, strpos( $filePath, '/' ) + 1 );
        $path = realpath( $this->getMountPoint() ). '/' . $filePathDir;
        if ( !file_exists( $path ) || !is_dir( $path ) )
        {
            throw new eZDFSFileHandlerBackendException( "NFS mount root $path not found" );
        }

        return false;
    }
384255
public function fileExists($containerName, $fileName, $relativePath)
    {
        $fullFileName = $this->getFullFileName($containerName, $fileName, $relativePath);

        return $this->filesystem->has($fullFileName);
    }
951188
public function fileExists($path) {

        $ch = curl_init($this->hostUrl . "/" . $this->siteFolder . $path);

        curl_setopt($ch, CURLOPT_NOBODY, true);

        $result = curl_exec($ch);
        $ret = false;

        if($result !== false) {
        $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);

        if($status == 200) {
            $ret = true;
        }
        }

        curl_close($ch);

        return $ret;
    }
1286705
public function exists()
    {
        clearstatcache();

        if (is_link($this->path)) {
            return true;
        } else {
            if ($this->isDirectory()) {
                return true;
            } else {
                return @file_exists($this->path) || is_link($this->path);
            }
        }
    }
458280
public function fileExists($containerName, $fileName, $relativePath)
    {
        return $this->fileUploadFacade->fileExists($containerName, $fileName, $relativePath);
    }
3629
function exists(filepath) {
		var does = grunt.file.exists(filepath);
		if (!does) {
			grunt.log.error(
				'Human error: ' + chalk.cyan(filepath) + ' not found.'
			);
			grunt.fail.errorcount++;
		}
		return does;
	}
1154006
public function exists($path)
    {
        if ('.' === $path || empty($path)) {
            $path = $this->localPath;
        } else {
            $path = "{$this->localPath}/{$path}";
        }

        return $this->filesystem->has($path);
    }
1339332
public function isTrustedResourceDir($filepath)
    {
        $_template = false;
        $_config = false;
        $_secure = false;

        $_template_dir = $this->smarty->getTemplateDir();
        $_config_dir = $this->smarty->getConfigDir();

        // check if index is outdated
        if ((!$this->_template_dir || $this->_template_dir !== $_template_dir)
            || (!$this->_config_dir || $this->_config_dir !== $_config_dir)
            || (!empty($this->secure_dir) && (!$this->_secure_dir || $this->_secure_dir !== $this->secure_dir))
        ) {
            $this->_resource_dir = array();
            $_template = true;
            $_config = true;
            $_secure = !empty($this->secure_dir);
        }

        // rebuild template dir index
        if ($_template) {
            $this->_template_dir = $_template_dir;
            foreach ($_template_dir as $directory) {
                $directory = realpath($directory);
                $this->_resource_dir[$directory] = true;
            }
        }

        // rebuild config dir index
        if ($_config) {
            $this->_config_dir = $_config_dir;
            foreach ($_config_dir as $directory) {
                $directory = realpath($directory);
                $this->_resource_dir[$directory] = true;
            }
        }

        // rebuild secure dir index
        if ($_secure) {
            $this->_secure_dir = $this->secure_dir;
            foreach ((array) $this->secure_dir as $directory) {
                $directory = realpath($directory);
                $this->_resource_dir[$directory] = true;
            }
        }

        $_filepath = realpath($filepath);
        $directory = dirname($_filepath);
        $_directory = array();
        while (true) {
            // remember the directory to add it to _resource_dir in case we're successful
            $_directory[$directory] = true;
            // test if the directory is trusted
            if (isset($this->_resource_dir[$directory])) {
                // merge sub directories of current $directory into _resource_dir to speed up subsequent lookup
                $this->_resource_dir = array_merge($this->_resource_dir, $_directory);

                return true;
            }
            // abort if we've reached root
            if (($pos = strrpos($directory, DS)) === false || !isset($directory[1])) {
                break;
            }
            // bubble up one level
            $directory = substr($directory, 0, $pos);
        }

        // give up
        throw new SmartyException("directory '{$_filepath}' not allowed by security setting");
    }
91585
public function exists(string $path): bool
    {
        $name = null;
        $subtree = $this->subtree($path, $name);

        return null !== $subtree && isset($subtree->ownData[$name]);
    }
137410
public function compressFile (string $filePath) : bool
    {
        $compressor = $this->getCompressor();

        if (null === $compressor)
        {
            return false;
        }

        $process = new Process(\array_merge($compressor, [$filePath]));
        $process->run();
        return $process->isSuccessful();
    }
845958
public static function exists(string $dir = ''): bool
    {
        $dir = static::normalizePath($dir);
        return static::verifyPath($dir) && \file_exists($dir) && \is_dir($dir);
    }
303971
function exists(filepath) {
  const cached = existsCache.has(filepath);

  // Only return positive to allow for generated files
  if (cached) return true;

  const filepathExists = fs.existsSync(filepath);

  if (filepathExists) existsCache.add(filepath);

  return filepathExists;
}
704215
public static function exist($path)
    {
        $path = Normalize::diskFullPath($path);
        return (file_exists($path) && is_readable($path) && is_file($path));
    }
1353785
function exists( $filename = false )
    {
        if ( !$filename )
            $filename = $this->FileName;
        return $this->doExists( $filename );
    }
924813
public static function countLines($filepath)
	{
		$return = false;
		if (file_exists($filepath)) {
			$handle = fopen($filepath, 'r');
			if ($handle) {
				$return = 0;
				while (!feof($handle)) {
					$chunk = fgets($handle, 4096);
					$chunk_count = substr_count($chunk, "\n");
					$return = $return + $chunk_count;
				}
				fclose($handle);
			}
		}
		return $return;
	}