如何获取Javascript文件的Datetime戳 [英] How to get the Datetime stamp of the Javascript file
本文介绍了如何获取Javascript文件的Datetime戳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何获取ASP.net中的javascript文件的日期时间戳
Hi,
How to get the Datetime stamp of the javascript file in ASP.net
推荐答案
由于您不清楚我要交付哪个时间戳他们三个都:
Since you were not clear about which time stamp you''re after I''ll deliver all three of them:
- File.GetCreationTimeUtc Method [^]
- File.GetLastAccessTimeUtc Method[^]
- File.GetLastWriteTimeUtc Method[^]
问候,
Manfred
Regards,
Manfred
您应该使用System.IO.FileInfo的文件信息类
You should use file info class of System.IO.FileInfo
System.IO.FileInfo f = new System.IO.FileInfo(JSFilePath);
f.LastWriteTime // is the file last modified date time
f.CreationTime // is the creation date time
这篇关于如何获取Javascript文件的Datetime戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文