Filepath Join
Joins multiple path segments into a single path.
Joins any number of path segments into a single, clean path.
This node uses the correct path separator for the operating system it runs on (\ on Windows, / on Linux/macOS). It also cleans the resulting path by removing any redundant separators and resolving .. elements. Empty segments are ignored.
Examples#
| Platform | Input Segments | Output Path |
|---|---|---|
| Windows | ["C:", "path", "to", "file.txt"] |
C:\path\to\file.txt |
| POSIX | ["/", "path", "to", "file.txt"] |
/path/to/file.txt |
| Any | ["path", "", "to", "file.txt"] |
path/to/file.txt or path\to\file.txt |
| Any | ["path/to", "../other"] |
path/other or path\other |
Inputs#
| Port | Description |
|---|---|
| The segments of the path to join. |
Outputs#
| Port | Description |
|---|---|
| The joined path. |
ID: core/filepath-join@v1