Node.js fs stat get file modified time

Description

Node.js fs stat get file modified time


var stat=require('fs').stat;

stat('/etc/passwd', function(err, s){
  if (err) throw err;
  console.log('modified %s', s.mtime);
});//  w ww. j a  va  2 s. c o  m



PreviousNext

Related