title: NodeJS fs Stats.isFile() not defined
body: <p>I'm new to NodeJS and I#m trying to read a directory recursively this is my code</p>
  
  <pre><code>var fs = require('fs');
  var readDir = function (dir, calback) {
  fs.readdir(dir, function (err, files) {
      if (err)
          console.log(err);
  
      for (var file in files) {
          fs.stat(dir + "/" + file, function (err, stats) {
              if (err)
                  console.log(err);
  
              if (stats.isFile()) {
                  calback(dir + "/" + file);
              }
              if (stats.isDirectory()) {
                  walk(file, calback);
  
              }
          });
      }
  });
  };
  </code></pre>
  
  <p>This is my ErrorMessage</p>
  
  <pre><code>C:\Users\Lukas\Desktop\Enide-Studio-05-kepler-win32\ws\PlayerTest\hello-world-server.js:24
              if (fs.stats.isFile()) {
                           ^
  TypeError: Cannot call method 'isFile' of undefined
      at C:\Users\Lukas\Desktop\Enide-Studio-05-kepler-win32\ws\PlayerTest\hello-world-server.js:24:30
      at Object.oncomplete (fs.js:107:15)
  </code></pre>
  
  <p>What is my mistake??</p>