std/node/url.ts

Deno standard library
Go to Latest
function fileURLToPath
import { fileURLToPath } from "https://deno.land/std@0.145.0/node/url.ts?s=fileURLToPath";

This function ensures the correct decodings of percent-encoded characters as well as ensuring a cross-platform valid absolute path string.

Parameters

path: string | URL[src]

The file URL string or URL object to convert to a path.

Returns

string[src]

The fully-resolved platform-specific Node.js file path.