Function resolve
- resolve(...pathSegments): string
Parameters
Rest...pathSegments: string[]Path segments to process to path.
Returns string
The resolved path.
Example: Usage
import { resolve } from "@std/path/resolve";
import { assertEquals } from "@std/assert";
if (Deno.build.os === "windows") {
assertEquals(resolve("C:\\foo", "bar", "baz"), "C:\\foo\\bar\\baz");
assertEquals(resolve("C:\\foo", "C:\\bar", "baz"), "C:\\bar\\baz");
} else {
assertEquals(resolve("/foo", "bar", "baz"), "/foo/bar/baz");
assertEquals(resolve("/foo", "/bar", "baz"), "/bar/baz");
}
Resolves path segments into a path.