Phantomjs-lastmodified-method

提供:Dev Guides
移動先:案内検索

PhantomJS-lastModified

このメソッドは、指定されたファイルに対して行われた最後の変更の詳細を返します。 ファイルが最後に変更された日時を返します。

構文

その構文は次のとおりです-

var fs = require('fs');
fs.lastModified(filename);

var fs = require('fs');
var system = require('system');
console.log(fs.lastModified(system.args[1]));
phantom.exit();

上記のプログラムは、次の output を生成します。

Sat May 13 2017 15:18:59 GMT+0530 (India Standard Time)