在Http服务器上获取文件信息? [英] Get Files Information on Http server?

查看:155
本文介绍了在Http服务器上获取文件信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何在c#

Hi,

How to get last modified time of file on http server in c#

推荐答案

Try:
中获取HTTP服务器上文件的最后修改时间
Try:
FileInfo fi = new FileInfo(@"F:\Temp\Roman.txt");
DateTime when = fi.LastWriteTime;


看看 WebClient [^ ]和 ResponseHeaders [
Take a look at WebClient[^] and ResponseHeaders[^]

ResponseHeaders is a collection of WebHeaderCollection, under Response headers there are information like:

Content-Length
Content-Type

Perhaps it can help you :-)


这篇关于在Http服务器上获取文件信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆