Return whether a path exists or not.

@param string $path   The path
@param bool   $public Determines if the path is in the public/protected folder

@return string
776002
public function exists($path, $public = true)
    {
        $path = $this->_relativepath($path, $public);

        return $this->_exists($path);
    }
1318455
public function has($path)
    {
        try {
            $this->api->resource($path);
        } catch (Exception $e) {
            return false;
        }

        return true;
    }
26396
public function has($path)
    {
        $path = $this->applyPathPrefix($path);
        $object = $this->bucket->object($path);

        return $object->exists();
    }
460530
public function getFolder($path = '')
    {
        $this->connect();

        $path = trim(trim($path, '/'));

        if ($this->isRootPath($path))
        {
            $data            = [ ];
            $data['files']   = [ ];
            $data['folders'] = [ 'Public', 'Protected' ];
            $folder          = new Folder('', $data);

            return $folder;
        }

        if (!$this->isValidPath($path))
        {
            return false;
        }

        $folder = parent::getFolder($path);

        if (!$folder && strpos($path, '/') === false) // Public or Protected folder
        {
            $data            = [ ];
            $data['files']   = [ ];
            $data['folders'] = [ ];
            $folder          = new Folder('', $data);

            return $folder;
        }

        return $folder;
    }
425595
public function check_path($path = '')
	{
		if ($path === '')
		{
			if ($this->db->cachedir === '')
			{
				return $this->db->cache_off();
			}

			$path = $this->db->cachedir;
		}

		// Add a trailing slash to the path if needed
		$path = realpath($path)
			? rtrim(realpath($path), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR
			: rtrim($path, '/').'/';

		if ( ! is_dir($path))
		{


			// If the path is wrong we'll turn off caching
			return $this->db->cache_off();
		}

		if ( ! is_really_writable($path))
		{

			// If the path is not really writable we'll turn off caching
			return $this->db->cache_off();
		}

		$this->db->cachedir = $path;
		return TRUE;
	}
14582
public static function isDir($path)
    {
        return (self::isPhar($path) === true) ? file_exists($path) : is_dir($path);
    }
886433
public function has(string ...$path): bool
    {
        try {
            $this->get(...$path);
        } catch (ConfigKeyNotFoundException $e) {
            return false;
        }

        return true;
    }
928564
protected function getBooleanValue($path)
    {
        $normalizedPath = strtolower($path);

        if (in_array($normalizedPath, ['true', 'on', 'yes'])) {
            return true;
        }

        if (in_array($normalizedPath, ['false', 'off', 'no'])) {
            return false;
        }

        return null;
    }
387671
public function checksumByPath(string $path)
    {
        return file_exists($path) ? $this->checksum((string) file_get_contents($path)) : null;
    }
927787
public static function isAbsolutePath($path) : bool
    {
        // path already absolute?
        if ($path[0] === '/') {
            return true;
        }

        // Matches the following on Windows:
        //  - \\NetworkComputer\Path
        //  - \\.\D:
        //  - \\.\c:
        //  - C:\Windows
        //  - C:\windows
        //  - C:/windows
        //  - c:/windows
        if (defined('PHP_WINDOWS_VERSION_BUILD') && self::isAbsoluteWindowsPath($path)) {
            return true;
        }

        // Stream
        if (strpos($path, '://') !== false) {
            return true;
        }

        return false;
    }
908600
protected function getParentPublicKey($path) {
        $path = BIP32Path::path($path)->parent()->publicPath();

        if ($path->count() <= 2) {
            return false;
        }

        if ($path->isHardened()) {
            return false;
        }

        if (!isset($this->pubKeys[(string)$path])) {
            $this->pubKeys[(string)$path] = $this->primaryPublicKeys[$path->getKeyIndex()]->buildKey($path);
        }

        return $this->pubKeys[(string)$path];
    }
965284
public function inPath($path = '', $reverse = false)
    {
        $dir = Folder::slashTerm($path);
        $current = Folder::slashTerm($this->pwd());

        if (!$reverse) {
            $return = preg_match('/^(.*)' . preg_quote($dir, '/') . '(.*)/', $current);
        } else {
            $return = preg_match('/^(.*)' . preg_quote($current, '/') . '(.*)/', $dir);
        }

        return (bool) $return;
    }
294570
public function pathExists($path)
    {
        if (!is_string($path)) {
            throw new InvalidArgumentException('The path must be a string.');
        }

        return $this->globRecursive($this->basePath().'/'.$path, GLOB_BRACE);
    }
803270
protected function getExistsPath($path)
    {
        $fullPath = $this->concatPaths($path);

        if (!file_exists($fullPath)) {
            $fullPath = $this->getExistsPath(pathinfo($fullPath, PATHINFO_DIRNAME));
        }

        return $fullPath;
    }
397335
public function exists($path)
  {
    $name = null;
    $subtree = $this->subtree($path, $name);

    return !is_null($subtree) && isset($subtree->_ownData[$name]);
  }
1222560
public function getPublicUrl($path = '')
    {
        if (isset($this->options['public_url'])) return $this->options['public_url'];

        return url() . '/' . $this->addSlashes(self::DEFAULT_PUBLIC_PATH) . $path;
    }
725029
public function getPathURL($path = '', $public = true)
    {
        $path = $this->getStoragePath($path);

        return $this->_storage->getUrl($path, $public);
    }