title: how to check stats for multiple file in directory and send as json to client?
body: <p>Lets assume i have three files in directory i want to check stats for all these files and send birthtimes to client ,Its always returning one file stats as you can see in data. How can i get stats for all files from directory ?</p>
  
  <p>app.js</p>
  
  <pre><code>  var path = './logs/ditLogs'
    fs.stat(path, function (err,stats) {
          console.log('STATS',stats);
          fileData.birthtime = stats.birthtime;
          //callback(stats.mtime);
      });
  </code></pre>
  
  <p>data </p>
  
  <pre><code>{ birthtime: Tue Jul 12 2016 09:33:14 GMT-0400 (Eastern Daylight Time),
    filename: ['server.log', 'server1.log' ] }
  </code></pre>