简体   繁体   中英

Get Creation Date of a file on the web

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!

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 )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM