
- 文件系统模块
- 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
广告