Get public url for the given path

@param string $path The path to expose
@param boolean $absolute Whether or not the url should be absolute

@return string
2866
public function getPublicUrl($path, $absolute = false)
    {
        return sprintf('%s/%s', $absolute ? $this->root : null, ltrim($path, '/'));
    }
361124
public function asset_url($path)
	{
		$url = $this->asset_path($path);

		if (filter_var($url, FILTER_VALIDATE_URL) === false)
		{
			$url = \Uri::create($url);
		}

		return $url;
	}
1100726
public function getPublicPath($path = '', $raiseException = false)
    {
        $publicDir = $this->config->get('publicDir', self::PLUGIN_HANDLE);
        $publicPath = $this->ioHelper->getRealPath($publicDir.'/'.$path);

        if (!$publicPath && $raiseException) {
            throw new Exception("{$publicPath} does not exist");
        }

        return (string)$publicPath;
    }
1107580
public function getPrivateUrl($path)
    {
        $getPolicy = new \Qiniu_RS_GetPolicy();
        return $getPolicy->MakeRequest($this->getUrl($path), null);
    }
1311104
protected function getLocalUrl($path)
    {
        $config = $this->driver->getConfig();

        // If an explicit base URL has been set on the disk configuration then we will use
        // it as the base URL instead of the default path. This allows the developer to
        // have full control over the base path for this filesystem's generated URLs.
        if ($config->has('url')) {
            return rtrim($config->get('url'), '/').'/'.ltrim($path, '/');
        }

        $path = '/storage/'.$path;

        // If the path contains "storage/public", it probably means the developer is using
        // the default disk to generate the path instead of the "public" disk like they
        // are really supposed to use. We will remove the public from this path here.
        if (Str::contains($path, '/storage/public/')) {
            return Str::replaceFirst('/public/', '/', $path);
        } else {
            return $path;
        }
    }
549059
public function url($path = null)
    {
        $config = $this->make('flarum.config');
        $url = array_get($config, 'url', array_get($_SERVER, 'REQUEST_URI'));

        if (is_array($url)) {
            if (isset($url[$path])) {
                return $url[$path];
            }

            $url = $url['base'];
        }

        if ($path) {
            $url .= '/'.array_get($config, "paths.$path", $path);
        }

        return $url;
    }
1153038
public function getUrl($path)
    {
        $path = ltrim($path, "/");
        $url = '';
        if ($this->isFile($path)) $url = $this->host.$path;

        return $url;
    }
223386
public function getUrl($path)
    {
        $adapter = $this->getAdapter();

        if (method_exists($adapter, 'getUrl')) {
            return $adapter->getUrl($path);
//        } elseif ($adapter instanceof AwsS3Adapter) {
//            return $this->getAwsUrl($adapter, $path);
        } elseif ($adapter instanceof LocalAdapter) {
            return $this->getLocalUrl($path);
        } else {
            throw new RuntimeException('This driver does not support retrieving URLs.');
        }
    }
67458
public function getFaqIndexPermalink(array $parameters = [], $absolute = 1)
    {
        return $this->getContainer()->get('router')->generate($this->getFaqIndexRoute(), $this->getFaqIndexRouteParameters($parameters), $absolute);
    }
514041
public static function isAbsoluteUrl($_path)
    {
        $url = parse_url($_path);

        return $url !== false && isset($url['scheme']) && $url['scheme'] != '';
    }
1205233
public function getPathUrl($path)
    {
        $path = $this->validatePath($path);

        $fullPath = $this->storagePath.implode("/", array_map("rawurlencode", explode("/", $path)));

        return Url::to($fullPath);
    }
1196563
public function getUrl( $path )
    {
        if (!$this->has($path)) throw new FileNotFoundException($filePath.' not found');
        return ( $this->ssl ? 'https://' : 'http://' ) . ( $this->isCname ? ( $this->cdnDomain == '' ? $this->endPoint : $this->cdnDomain ) : $this->bucket . '.' . $this->endPoint ) . '/' . ltrim($path, '/');
    }
217671
public function url( $path )
	{
		$adapter = $this->driver->getAdapter();

		if ( $adapter instanceof AwsS3Adapter )
		{
			$path = $adapter->getPathPrefix() . $path;

			return $adapter->getClient()->getObjectUrl( $adapter->getBucket(), $path );
		}
		elseif ( $adapter instanceof LocalAdapter )
		{
			return '/storage/' . $path;
		}
		elseif ( method_exists( $adapter, 'getUrl' ) )
		{
			return $adapter->getUrl( $path );
		}
		else
		{
			throw new RuntimeException( 'This driver does not support retrieving URLs.' );
		}
	}
108646
protected function _abspath($path) {
		return $path == DIRECTORY_SEPARATOR ? $this->root : $this->root.DIRECTORY_SEPARATOR.$path;
	}
288836
static function path_to_url( $path )
    {
        // We are replacing DIRECTORY_SEPARATOR with forward slash here 
        // to avoid issues in Windows systems
        $path    = str_replace( DIRECTORY_SEPARATOR, '/', $path);
        $abspath = str_replace( DIRECTORY_SEPARATOR, '/', ABSPATH);
        $url     = str_replace( $abspath, '', $path );

        return esc_url_raw( site_url( $url ) );
    }
1165778
public function getBaseUrl($path)
    {
        if (1 === \count($this->baseUrls)) {
            return $this->baseUrls[0];
        }

        return $this->baseUrls[$this->chooseBaseUrl($path)];
    }
512115
public function getNode($path)
    {
        if (!is_string($path) || $path[0] !== '/') {
            throw new \InvalidArgumentException('Only absolute paths are allowed for Context::getNode()', 1284975105);
        }

        $path = strtolower($path);

        $workspaceRootNode = $this->getWorkspace()->getRootNodeData();
        $rootNode = $this->nodeFactory->createFromNodeData($workspaceRootNode, $this);
        if ($path !== '/') {
            $node = $this->firstLevelNodeCache->getByPath($path);
            if ($node === false) {
                $node = $rootNode->getNode(substr($path, 1));
                $this->firstLevelNodeCache->setByPath($path, $node);
            }
        } else {
            $node = $rootNode;
        }

        return $node;
    }