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

x/ayonli_jsext/esm/path.js>toFsPath

A JavaScript extension package for building strong and modern applications.
Latest
function toFsPath
import { toFsPath } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/path.js";

Converts the given URL to a file system path if it's not one already.

Examples

Example 1

import { toFsPath } from "@ayonli/jsext/path";

console.log(toFsPath("file:///foo/bar")); // "/foo/bar"
console.log(toFsPath("file:///c:/foo/bar")); // "c:\\foo\\bar"