old_contents: const testFolder = '.'
  const fs = require('fs')
  const path = require('path')
  
  fs.readdir(testFolder, (err, files) => {
  
    files.forEach(file => {
  
      fs.stat(path.join(__dirname, file), (err, stats) => {
        if (stats) console.log(file, stats.isDirectory())
      })
  
    })
  
  })
  
new_contents: import path from 'path'
  import Promise from 'bluebird'
  const fs = Promise.promisifyAll(require('fs'))
  
  const recursiveRename = async () => {
    const testFolder = '.'
    const files = await fs.readdirAsync(testFolder)
  
    files.forEach(async file => {
      const filePath = path.join(__dirname, file)
  
      const stats = await fs.statAsync(filePath)
  
      if (stats) console.log(file, stats.isDirectory())
  
    })
  }
  
  
  recursiveRename()
  
subject: Use async/await