Function join
- join(...paths): string
Parameters
Rest...paths: string[]Paths to be joined and normalized.
Returns string
The joined and normalized path.
Example: Usage
import { join } from "@std/path/join";
import { assertEquals } from "@std/assert";
if (Deno.build.os === "windows") {
assertEquals(join("C:\\foo", "bar", "baz\\quux", "garply", ".."), "C:\\foo\\bar\\baz\\quux");
} else {
assertEquals(join("/foo", "bar", "baz/quux", "garply", ".."), "/foo/bar/baz/quux");
}Note: If you are working with file URLs, use the new version of
joinfrom@std/path/unstable-join.
Joins a sequence of paths, then normalizes the resulting path.