Check if file exists.

@author Jonas Schwartz <josc@nodes.dk>
@param string $path
@return bool
554635
public function fileExists($path)
    {
        $filePath = $this->getFullPath($path);

        return file_exists($filePath) ? true : false;
    }
771489
public function exists(string $path) : bool
    {
        $explode = explode('/', $path);
        $config = $this->config;
        while ($element = array_shift($explode)) {
            if (!array_key_exists($element, $config)) {
                return false;
            }
            $config = $config[$element];
        }

        return true;
    }
646632
public static function isFile($path)
    {
        if (is_file($path)) {
            if (strstr(PHP_OS, 'WIN')) {
                if (basename(realpath($path)) != basename($path)) {
                    return false;
                }
            }

            return true;
        }

        return false;
    }
1331568
public function pathExists(string $path): bool
	{
		$loader = $this->getRenderer()->getLoader();

		/*
		 * For Twig 1.x compatibility, check if the loader implements ExistsLoaderInterface
		 * As of Twig 2.0, the `exists()` method is part of LoaderInterface
		 * This conditional may be removed when dropping Twig 1.x support
		 */
		if ($loader instanceof ExistsLoaderInterface || method_exists(LoaderInterface::class, 'exists'))
		{
			return $loader->exists($path);
		}

		// For all other cases we'll assume the path exists
		return true;
	}
551800
public function exists($path)
    {
        $metadata = $this->dropbox->getMetadata($this->pathRoot.$path);
        return is_array($metadata) && isset($metadata['path']);
    }
1275619
private function createPathIfNeeded(string $path) : bool
    {
        if (! is_dir($path)) {
            if (@mkdir($path, 0777 & (~$this->umask), true) === false && ! is_dir($path)) {
                return false;
            }
        }

        return true;
    }
624243
public function assertExists($path)
    {
        $paths = Arr::wrap($path);

        foreach ($paths as $path) {
            PHPUnit::assertTrue(
                $this->exists($path), "Unable to find a file at path [{$path}]."
            );
        }

        return $this;
    }
868868
public function existsChunk($path)
    {
        $path = Alias::getAlias($path, ['lang' => $this->locale]);
        if (!pathinfo($path, PATHINFO_EXTENSION)) {
            $path .= '.' . $this->defaultExtension;
        }

        return file_exists($path);
    }
715668
protected function nodeExists( $path )
    {
        if ( !isset( $this->cachedNodes[$path] ) )
        {
            $this->cachedNodes[$path] = $this->getNodeInfo( $path );
        }

        return $this->cachedNodes[$path]['nodeExists'];
    }
650498
public function isFile($path)
    {
        $path = trim($path, '/');
        return $this->clientS3->doesObjectExist($this->bucket, $path);
    }
1164778
public function exists($path)
	{
		// Explode the registry path into an array
		$nodes = explode('.', $path);

		if ($nodes)
		{
			// Initialize the current node to be the registry root.
			$node = $this->data;

			// Traverse the registry to find the correct node for the result.
			for ($i = 0, $n = count($nodes); $i < $n; $i++)
			{
				if (isset($node->$nodes[$i]))
				{
					$node = $node->$nodes[$i];
				}
				else
				{
					break;
				}

				if ($i + 1 == $n)
				{
					return true;
				}
			}
		}

		return false;
	}
732190
public function checkPath($path)
    {
        $path = realpath($path);

        return ($path !== false && is_dir($path)) ? $path : false;
    }
1198902
public function has(string $path)
    {
        $path = Util::normalizePath($path);

        return $path === '' ? false : (bool) $this->adapter->has($path);
    }
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;
    }
1050780
protected function verifyPath($path){
		if (file_exists($path)) return true;
			
		if (mkdir($path, 0777, true)) return true;
				
		return false;
	}
473719
public static function isSrcPathExists(string $path, string $file = null): bool
    {
        $src = self::$parameters['dir'] . $path . $file;
        return file_exists($src) && is_file($src);
    }
214530
public function hasParam($path)
    {
        $this->validatePath($path);

        $value = $this->translatePathElement($path, $this->params);

        return (null === $value) ? false : true;
    }