title: Node: fs.readdir() always returns files
body: <p>I have this code snippet:</p>
  <pre><code>fs.readdir(STLFilesDir, (err, files) =&gt; {
              if (err)
              {
                  console.log(err);
                  throw err;
              }
              if (files)
              {
                  console.log(files); //files is an array with all the files in the directory
                  res.render('prerenderer.ejs');
              }   
              else 
              {
                  console.log('no files found');
                  res.render('prerenderer.ejs');
              }
  </code></pre>
  <p>However, in the case of not having any files in the folder, I dont't get what is expected.
  Instead of seeing no files found, in the console.
  I get this <code>[]</code>.
  This is an empty object.
  This means that the last <code>else</code> does not work. So <code>fs.readdir()</code> always returns an array - even if it's empty.
  So how can I get the <code>else</code> portion to run?</p>