Get Creation Date of a file on the web

邮差的信 提交于 2019-12-13 06:58:38

问题


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!


回答1:


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

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



来源:https://stackoverflow.com/questions/27352736/get-creation-date-of-a-file-on-the-web

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!