1'use strict';
2
3const { mkdir } = require('fs').promises;
4
5(async function main() {
6 try {
7 const parent = '.';
8 const dirnames = ['pdfs', 'fonts', 'err/or', 'users'];
9
10 await Promise.all(
11 dirnames.map(dirname => mkdir(`${parent}/${dirname}`).catch(console.error))
12 );
13
14 // All dirs are created here or errors reported.
15 } catch (err) {
16 console.error(err);
17 }
18})();