Created
June 15, 2019 23:44
-
-
Save andy51002000/f38a821781548b3047cb1e6f08445346 to your computer and use it in GitHub Desktop.
Node.js list all files in a directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const testFolder = './tests/'; | |
const fs = require('fs'); | |
fs.readdirSync(testFolder).forEach(file => { | |
console.log(file); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment