Read files from a directory using Promises V2
First of all, async code is not a requirement for all Node.js code. It depends on the use case. Async code makes sense if you want to service multiple things concurrently (i.e. HTTP servers, test runners, etc.) but doesn't make sense for single-run script-y things (i.e. cli tool, scaffold generator, etc.).

The case above falls in the second category, a simple, single-run, non-concurrent, non-intensive operation. This means you can get away with the synchronous versions of the same operations, which will not require promises.

const { readdirSync, statSync, readFileSync, writeFileSync } = require('fs');

readdirSync('.')
  .slice(0, 1)
  .map(file =&gt; ({ stat: statSync(f), file }))
  // If you know it's not readable, just don't proceed.
  .filter(data =&gt; (data.stat.mode | fs.S_IRWXO))
  .map(data =&gt; readFileSync(data.file))
  .forEach(content =&gt; writeFileSync('test', content))

// If it made it all the way here, it worked. If something threw up,
// it should have halted the script somewhere in the middle.
console.log("It worked")


Now if you really want async code, Node supports async/await. It's essentially syntactic sugar to promises, where async functions return promises, values returned by async functions become the resolved value, errors throw become rejection values, and await makes code appear to wait for the promise to settle before proceeding. This means you can write the code much closer to the one above.

The one nice thing about async/await over regular promises is better scoping. You don't have to pass forward stuff from the previous then to the next then.

const { promisify } = require('util')
const fs = require('fs')
const readdir = promisify(fs.readdir)
const readFile = promisify(fs.readFile)
const writeFile = promisify(fs.writeFile)
const stat = promisify(fs.stat)

async function op(){
  const files = await readdir('.')
  const file = files[0]
  const data = await stat(file)

  if (!(data.stat.mode | fs.S_IRWXO)) throw "Not Readable"

  const content = await readFile(file)

  await writeFile('Test', content)
}

// Needed, since Node will warn you about unhandled rejections.
// Otherwise, the code above could have been an async iife.
op().then(() =&gt; {
  console.log("It worked")
}, (e) =&gt; {
  console.log("Error: " + e)
})