<titledata-rh="true">Class: Uri | Podman Desktop</title><metadata-rh="true"name="viewport"content="width=device-width,initial-scale=1"><metadata-rh="true"name="twitter:card"content="summary_large_image"><metadata-rh="true"property="og:image"content="https://podman-desktop.io/img/banner_podman-desktop.png"><metadata-rh="true"name="twitter:image"content="https://podman-desktop.io/img/banner_podman-desktop.png"><metadata-rh="true"property="og:url"content="https://podman-desktop.io/api/classes/Uri"><metadata-rh="true"property="og:locale"content="en"><metadata-rh="true"name="docusaurus_locale"content="en"><metadata-rh="true"name="docsearch:language"content="en"><metadata-rh="true"name="docusaurus_version"content="current"><metadata-rh="true"name="docusaurus_tag"content="docs-api-current"><metadata-rh="true"name="docsearch:version"content="current"><metadata-rh="true"name="docsearch:docusaurus_tag"content="docs-api-current"><metadata-rh="true"property="og:title"content="Class: Uri | Podman Desktop"><metadata-rh="true"name="description"content="Resource identifier for a resource"><metadata-rh="true"property="og:description"content="Resource identifier for a resource"><linkdata-rh="true"rel="icon"href="/img/favicon.ico"><linkdata-rh="true"rel="canonical"href="https://podman-desktop.io/api/classes/Uri"><linkdata-rh="true"rel="alternate"href="https://podman-desktop.io/api/classes/Uri"hreflang="en"><linkdata-rh="true"rel="alternate"href="https://podman-desktop.io/api/classes/Uri"hreflang="x-default"><linkdata-rh="true"rel="preconnect"href="https://MR01ANKQ9S-dsn.algolia.net"crossorigin="anonymous"><linkrel="alternate"type="application/rss+xml"href="/blog/rss.xml"title="Podman Desktop RSS Feed">
<linkrel="alternate"type="application/atom+xml"href="/blog/atom.xml"title="Podman Desktop Atom Feed">
<h2class="anchor anchorWithStickyNavbar_JmGV"id="constructors">Constructors<ahref="#constructors"class="hash-link"aria-label="Direct link to Constructors"title="Direct link to Constructors"></a></h2>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="new-uri">new Uri()<ahref="#new-uri"class="hash-link"aria-label="Direct link to new Uri()"title="Direct link to new Uri()"></a></h3>
<p>Use the <code>file</code> and <code>parse</code> factory functions to create new <code>Uri</code> objects.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="parameters">Parameters<ahref="#parameters"class="hash-link"aria-label="Direct link to Parameters"title="Direct link to Parameters"></a></h4>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="returns">Returns<ahref="#returns"class="hash-link"aria-label="Direct link to Returns"title="Direct link to Returns"></a></h4>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source">Source<ahref="#source"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h2class="anchor anchorWithStickyNavbar_JmGV"id="properties">Properties<ahref="#properties"class="hash-link"aria-label="Direct link to Properties"title="Direct link to Properties"></a></h2>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="authority">authority<ahref="#authority"class="hash-link"aria-label="Direct link to authority"title="Direct link to authority"></a></h3>
<p>Authority is the <code>www.example.com</code> part of <code>http://www.example.com/some/path?query#fragment</code>.
The part between the first double slashes and the next slash.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-1">Source<ahref="#source-1"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="fragment">fragment<ahref="#fragment"class="hash-link"aria-label="Direct link to fragment"title="Direct link to fragment"></a></h3>
<p>Fragment is the <code>fragment</code> part of <code>http://www.example.com/some/path?query#fragment</code>.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-2">Source<ahref="#source-2"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="fspath">fsPath<ahref="#fspath"class="hash-link"aria-label="Direct link to fsPath"title="Direct link to fsPath"></a></h3>
<p>The string representing the corresponding file system path of this Uri.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-3">Source<ahref="#source-3"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="path">path<ahref="#path"class="hash-link"aria-label="Direct link to path"title="Direct link to path"></a></h3>
<p>Path is the <code>/some/path</code> part of <code>http://www.example.com/some/path?query#fragment</code>.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-4">Source<ahref="#source-4"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="query">query<ahref="#query"class="hash-link"aria-label="Direct link to query"title="Direct link to query"></a></h3>
<p>Query is the <code>query</code> part of <code>http://www.example.com/some/path?query#fragment</code>.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-5">Source<ahref="#source-5"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="scheme">scheme<ahref="#scheme"class="hash-link"aria-label="Direct link to scheme"title="Direct link to scheme"></a></h3>
<p>Scheme is the <code>http</code> part of <code>http://www.example.com/some/path?query#fragment</code>.
The part before the first colon.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-6">Source<ahref="#source-6"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h2class="anchor anchorWithStickyNavbar_JmGV"id="methods">Methods<ahref="#methods"class="hash-link"aria-label="Direct link to Methods"title="Direct link to Methods"></a></h2>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="tostring">toString()<ahref="#tostring"class="hash-link"aria-label="Direct link to toString()"title="Direct link to toString()"></a></h3>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="returns-1">Returns<ahref="#returns-1"class="hash-link"aria-label="Direct link to Returns"title="Direct link to Returns"></a></h4>
<p><code>string</code></p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-7">Source<ahref="#source-7"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="with">with()<ahref="#with"class="hash-link"aria-label="Direct link to with()"title="Direct link to with()"></a></h3>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="parameters-1">Parameters<ahref="#parameters-1"class="hash-link"aria-label="Direct link to Parameters"title="Direct link to Parameters"></a></h4>
<p>• <strong>change</strong></p>
<p>An object that describes a change to this Uri. To unset components use <code>undefined</code> or
<p>The new scheme, defaults to this Uri's scheme.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="returns-2">Returns<ahref="#returns-2"class="hash-link"aria-label="Direct link to Returns"title="Direct link to Returns"></a></h4>
<p>A new Uri that reflects the given change. Will return <code>this</code> Uri if the change
is not changing anything.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-8">Source<ahref="#source-8"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="file">file()<ahref="#file"class="hash-link"aria-label="Direct link to file()"title="Direct link to file()"></a></h3>
<p>Create an URI from a file system path. The <ahref="/api/classes/Uri#scheme">scheme</a>
will be <code>file</code>.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="parameters-2">Parameters<ahref="#parameters-2"class="hash-link"aria-label="Direct link to Parameters"title="Direct link to Parameters"></a></h4>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="returns-3">Returns<ahref="#returns-3"class="hash-link"aria-label="Direct link to Returns"title="Direct link to Returns"></a></h4>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-9">Source<ahref="#source-9"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="joinpath">joinPath()<ahref="#joinpath"class="hash-link"aria-label="Direct link to joinPath()"title="Direct link to joinPath()"></a></h3>
<p>Create a new uri which path is the result of joining
the path of the base uri with the provided path segments.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="parameters-3">Parameters<ahref="#parameters-3"class="hash-link"aria-label="Direct link to Parameters"title="Direct link to Parameters"></a></h4>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="returns-4">Returns<ahref="#returns-4"class="hash-link"aria-label="Direct link to Returns"title="Direct link to Returns"></a></h4>
<p>A new uri which path is joined with the given fragments</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-10">Source<ahref="#source-10"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>
<h3class="anchor anchorWithStickyNavbar_JmGV"id="parse">parse()<ahref="#parse"class="hash-link"aria-label="Direct link to parse()"title="Direct link to parse()"></a></h3>
<p>Create an URI from a string, e.g. <code>http://www.example.com/some/path</code>,
<code>file:///usr/home</code>, or <code>scheme:with/path</code>.</p>
<p><em>Note</em> that for a while uris without a <code>scheme</code> were accepted. That is not correct
as all uris should have a scheme. To avoid breakage of existing code the optional
<code>strict</code>-argument has been added. We <em>strongly</em> advise to use it, e.g. <code>Uri.parse('my:uri', true)</code></p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="parameters-4">Parameters<ahref="#parameters-4"class="hash-link"aria-label="Direct link to Parameters"title="Direct link to Parameters"></a></h4>
<p>Throw an error when <code>value</code> is empty or when no <code>scheme</code> can be parsed.</p>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="returns-5">Returns<ahref="#returns-5"class="hash-link"aria-label="Direct link to Returns"title="Direct link to Returns"></a></h4>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="see">See<ahref="#see"class="hash-link"aria-label="Direct link to See"title="Direct link to See"></a></h4>
<h4class="anchor anchorWithStickyNavbar_JmGV"id="source-11">Source<ahref="#source-11"class="hash-link"aria-label="Direct link to Source"title="Direct link to Source"></a></h4>