node:path

The built-in Node.js module for building and taking apart file paths correctly on every operating system.

In more detail

path.join("a", "b") uses / on Linux and macOS and \ on Windows, so paths built with it work everywhere. Use path.resolve() to turn a relative path into an absolute one.

Related terms

Taught in

References