Path
path.join()
Combines string path segments with the platform separator and normalizes the result. It does not access the filesystem or establish containment.
Formal Syntax & Structure
nodejs syntaxnodejs
path.join(...paths)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| paths | string[] | Zero or more segments passed as separate arguments. |
Return Value
string
Normalized combined path.
Working Example
Example Snippetnodejs
import path from "node:path";console.log(path.posix.join("reports", "today.csv"));