1async function printFiles () {
2 const files = await getFilePaths();
3
4 await Promise.all(files.map(async (file) => {
5 const contents = await fs.readFile(file, 'utf8')
6 console.log(contents)
7 }));
8}
1async function printFiles () {
2 const files = await getFilePaths();
3
4 for (const file of files) {
5 const contents = await fs.readFile(file, 'utf8');
6 console.log(contents);
7 }
8}
9