- 檔案系統模組
- PhantomJS - 屬性
- PhantomJS - 方法
- 系統模組
- PhantomJS - 屬性
- Web 伺服器模組
- PhantomJS - 屬性
- PhantomJS - 方法
- 其他
- 命令列介面
- PhantomJS - 螢幕捕獲
- PhantomJS - 頁面自動化
- PhantomJS - 網路監控
- PhantomJS - 測試
- PhantomJS - REPL
- PhantomJS - 示例
- PhantomJS 有用的資源
- PhantomJS - 快速指南
- PhantomJS - 有用的資源
- PhantomJS - 討論
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();
上述程式生成以下輸出。
Sat May 13 2017 15:18:59 GMT+0530 (India Standard Time)
phantomjs_file_system_module_methods.htm
廣告