获取Web上文件的创建日期 [英] Get Creation Date of a file on the web

查看:124
本文介绍了获取Web上文件的创建日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题已在此处提出:通过HTTP获取文件创建日期

I know this question was already asked here: Get File Creation Date Over HTTP

但是,我没有得到所需的答案。我不想获得上次修改日期。相反,我想要创建日期。

BUT, I didn't get the answer needed. I don't want to get the "Last Modified" date. Instead I want the creation date.

以下代码从标题中获取最后修改日期。

The following code gets me the last modified date from the headers.

Dim request As System.Net.HttpWebRequest = DirectCast(WebRequest.Create("http://10.20.80.111/mobilepayment/myfile.crt"), System.Net.HttpWebRequest)

        Dim lastmodified As String

        Using response As WebResponse = request.GetResponse()

            lastmodified = response.Headers("last-modified").ToString()
        End Using

有没有办法可以获得创作日期?请帮助!

Is there a way I can get the creation date? please help!

推荐答案

不,在普通的HTTP中没有标准的标题字段。

No, in plain HTTP there is no standard header field for that.

(WebDAV确实有它的属性,但是: http:/ /greenbytes.de/tech/webdav/rfc4918.html#PROPERTY_creationdate

(WebDAV does have a property for it, though: http://greenbytes.de/tech/webdav/rfc4918.html#PROPERTY_creationdate)

这篇关于获取Web上文件的创建日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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