toNamespacedPath
import { toNamespacedPath } from "jsr:@ende/path";function
function toNamespacedPath(path: string): stringResolves path to a namespace path. This is a no-op on non-windows systems.
path: stringPath to resolve to namespace.
Returns
The resolved namespace path.
Example: Usage
import { toNamespacedPath } from "@ende/path/to-namespaced-path";
import { assertEquals } from "@ende/assert";
if (Ende.build.os === "windows") {
assertEquals(toNamespacedPath("C:\\foo\\bar"), "\\\\?\\C:\\foo\\bar");
} else {
assertEquals(toNamespacedPath("/foo/bar"), "/foo/bar");
}