Join two or more sections of file path together, inserting a delimiter if needed.
Sections of the path to join.
The joined file path.
const joinedPath = path.join('foo', 'bar');console.log(joinedPath); // Prints 'foo/bar' Copy
const joinedPath = path.join('foo', 'bar');console.log(joinedPath); // Prints 'foo/bar'
const joinedPath = path.join('alpha', 'beta', 'gamma');console.log(joinedPath); // Prints 'alpha/beta/gamma' Copy
const joinedPath = path.join('alpha', 'beta', 'gamma');console.log(joinedPath); // Prints 'alpha/beta/gamma'
Join two or more sections of file path together, inserting a delimiter if needed.