Check if a file exists

@todo Rename to exists()
@param string The filename to check the existance of
@return boolean
545840
public function has($file)
    {
        $file = "/".ltrim($file,"/");
        foreach($this->nodes as $node) {
            $mount = $node->getMountPoint();
            if (strncmp($mount, $file, strlen($mount)) === 0) {
                $nodefile = substr($file, strlen($mount));
                if ($node->has($nodefile)) {
                    return true;
                }
            }
        }
        return false;
    }
1338421
public static function exist($name)
    {
        $name = ucfirst($name);

        /*
         * If it was checked before negatively - direct return.
         */
        if (in_array($name, self::$_unavailableModules)) {
            return false;
        }

        /*
         * Check if it was already loaded.
         */
        if (isset(self::$_loadedModules[$name])) {
            return true;
        }

        /*
         * Or the file exists.
         */
        if (file_exists(self::getModulePath().$name.'.php')) {
            return true;
        } else {
            self::$_unavailableModules[] = $name;
        }

        /*
         * Module does not exist.
         */

        return false;
    }
390572
public static function exists($path)
    {
        if (file_exists($path) === false) {
            return false;
        }

        $path = preg_replace('#^file:/+([a-z]:/|/)#i', '$1', $path);
        $pinfo = pathinfo($path);

        $rpath = strtr(realpath($path), '\\', '/');

        if ($pinfo['dirname'] !== '.') {
            $path = Uri::canonpath($pinfo['dirname']) . '/' . $pinfo['basename'];
        }

        $pinfo = null;

        return $rpath === $path || substr($rpath, strlen($rpath) - strlen($path)) === $path;
    }
528312
protected function exists($name): bool
    {
        return
            isset($this->___data___[$name]) ||
            \array_key_exists($name, $this->___data___);
    }
146432
public function exists($key)
	{
		$file = $this->getPath($key);

		return (file_exists($file) && filemtime($file) > time());
	}
517069
public function hasFile(string $name) : bool
    {
        return $this->fileContentAreas->any(function (FileContentArea $contentArea) use ($name) {
            return $contentArea->name === $name;
        });
    }
737997
public static function fileExists($fileName)
    {
        $fp = @fopen($fileName, 'r', true);
        if (is_resource($fp)) {
            fclose($fp);
            return true;
        }
        return false;
    }
123145
public function hasFile($filename)
    {
        return is_file($filename = $this->outDir.DIRECTORY_SEPARATOR.$filename) ? true : false;
    }
1157870
public static function exists(string $link = ''): bool
    {
        $link = static::normalizePath($link);
        return static::verifyPath($link) && \file_exists($link) && \is_link($link);
    }
24632
public function exists(string $path): bool
    {
        $path = $this->normalizePath($path);

        return strlen($path) === 0 ? false : $this->getAdapter()->exists($path);
    }
1266452
function exists()
    {
        $path = $this->PHPDir . '/' . $this->PHPFile;
        if ( !$this->ClusteringEnabled )
            return file_exists( $path );

        if ( !$this->ClusterHandler )
        {
            $this->ClusterHandler = eZClusterFileHandler::instance();
        }
        return $this->ClusterHandler->fileExists( $path );
    }
1195335
public function fileExists($file)
    {
        return ($this->isConnected() === true) ? ftp_rmdir($this->connectionString.$file) : false;
    }
454185
public function exists()
    {
        try {
            $path = $this->getPrefix();

            if ($this->getFileSystem()->has($path)) {
                $metadata = $this->getFileSystem()->getMetadata($this->getPrefix());
                return $metadata['type'] === 'file';
            }
        } catch (FileNotFoundException $e) {
        }
        return false;
    }
1215973
function fileExists(fileName) {
        if (!fileName) {
            return false;
        }

        var filePath = PathUtils.resolveInRoot(outputFolder, fileName);
        return fs.existsSync(filePath);
    }
572106
public static function check($filename)
    {
        if (!$filename = static::path($filename)) {
            return null;
        }

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

        return filemtime($filename);
    }
1325966
public static function exists($file, $type = null)
    {
        if (!$type) {
            return file_exists($file);
        }

        $ret = false;

        if ($type === 'file') {
            $ret = is_file($file);
        } elseif ($type === 'dir') {
            $ret = is_dir($file);
        } elseif ($type === 'link') {
            $ret = is_link($file);
        }

        return $ret;
    }
1029588
protected function exists($key)
    {
        if ($this->enabled && opcache_is_script_cached($this->filePath($key))) {
            return true;
        }
        return file_exists($this->filePath($key));
    }