FileWebResponse获取最后修改日期 [英] FileWebResponse get last modified date
本文介绍了FileWebResponse获取最后修改日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有办法使用System.Net.FileWebResponse对象获取文件的上次修改日期? 该类中没有定义修改日期属性。
Is there a way using the System.Net.FileWebResponse object to get the last modified date for the file? There is no modified date property defined in the class.
提前致谢
推荐答案
您好Clem_FRB,
Hi Clem_FRB,
谢谢在这里发布。
据我所知,这个类没有属性来获取文件的最后修改时间。我建议你使用
File.GetLastWriteTime Method(String)获取上次写入指定文件或目录的日期和时间。
As I know, there is no property of this class to get the last modified time of file. I suggest you to use File.GetLastWriteTime Method (String) to get the date and time the specified file or directory was last written to.
DateTime dt = File.GetLastWriteTime(path);
最好的问候,
Wendy
这篇关于FileWebResponse获取最后修改日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文