toNamespacedPath

import { toNamespacedPath } from "jsr:@ende/path/windows/to-namespaced-path";

function

function toNamespacedPath(path: string): string

Resolves path to a namespace path

path: string

The path to resolve to namespaced path

Returns

The resolved namespaced path

Example: Usage

import { toNamespacedPath } from "@ende/path/windows/to-namespaced-path";
import { assertEquals } from "@ende/assert";

const namespaced = toNamespacedPath("C:\\foo\\bar");
assertEquals(namespaced, "\\\\?\\C:\\foo\\bar");

Source