Create a gist now

Instantly share code, notes, and snippets.

@pionize /.js
Created Jul 25, 2017

What would you like to do?
import fs from 'fs-promise'
async function printFiles () {
const files = await getFilePaths() // Assume this works fine
files.forEach(async (file) => {
const contents = await fs.readFile(file, 'utf8')
console.log(contents)
})
}
printFiles()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment