Skip to main content
Module

std/node/url.ts>fileURLToPath

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

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

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

Returns

string

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