Node.js: getting started

Lesson 04 · 9 min

Files and paths

fs reads and writes, path joins paths without OS surprises.

9 minLesson 4 of 10Practice includedAsk AI on any point

The node:fs/promises module gives you async readFile, writeFile, and mkdir. Join paths with node:path: path.join uses the right separator, and path.extname gets the extension.

Sign in to continue

The rest of this lesson opens after sign up

The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.