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

x/hex/src/generator/deps.ts>pathPosix.toFileUrl

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

Converts a path string to a file URL.

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

Parameters

path: string

to convert to file URL