Node JS создать или проверить каталог

//Synchronously
fs.mkdirSync('./path/to/my/directory', { recursive: true })

//Asynchronously
await fs.promise.mkdir('./path/to/my/directory', { recursive: true })
Jaimin Patel