Skip to content

Instantly share code, notes, and snippets.

@pionize
Created July 25, 2017 02:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pionize/f7a0ae022284ad5cbb8728b66212007d to your computer and use it in GitHub Desktop.
Save pionize/f7a0ae022284ad5cbb8728b66212007d to your computer and use it in GitHub Desktop.
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