Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/hex/src/web/deps.ts>pathPosix.fromFileUrl

An ecosystem delivering practices, philosophy and portability.
Go to Latest
function pathPosix.fromFileUrl
import { pathPosix } from "https://deno.land/x/hex@0.5.15/src/web/deps.ts";
const { fromFileUrl } = pathPosix;

Converts a file URL to a path string.

     import { fromFileUrl } from "https://deno.land/std@0.224.0/path/posix.ts";
     fromFileUrl("file:///home/foo"); // "/home/foo"

Parameters

url: string | URL

of a file URL

Returns

string