Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/hex/src/cli/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/cli/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