Skip to main content
Module

std/path/win32.ts>fromFileUrl

Deno standard library
Go to Latest
function fromFileUrl
import { fromFileUrl } from "https://deno.land/std@0.60.0/path/win32.ts";

Converts a file URL to a path string.

 fromFileUrl("file:///C:/Users/foo"); // "C:\\Users\\foo"
 fromFileUrl("file:///home/foo"); // "\\home\\foo"

Note that non-file URLs are treated as file URLs and irrelevant components are ignored.

Parameters

url: string | URL

Returns

string