The GetFileTime method can be used to determine the date
and time that a file was last modified on the server. The time may
either be localized to the current system, or it may be returned as
UTC time.
This method uses the HEAD command to retrieve header information
about the file without downloading the contents of the file itself.
This requires that the server support at least version 1.0 of the
protocol standard, or an error will be returned.
The server may not return a modification time for some resources.
If the request to the server was successful and the file exists, but
the server does not return a modification time, the method will
succeed but all of the members of the SYSTEMTIME structure will be
zero.
When a request is made to the server for information about the
file, the library will attempt to keep the connection alive, even if
the HTTP_OPTION_KEEPALIVE option has not been specified for the
session. This allows an application to request the modification time
and then download the file without having to write additional code to
re-establish the connection. However, it is possible that the attempt
to keep the connection open will fail. In that case, an error will be
returned and the client handle will no longer be valid. If this
happens, the SYSTEMTIME structure may still contain a valid value. If
the library was able to determine the modification time, but was not
able to maintain the connection to the server, the members of the
SYSTEMTIME structure will specify a valid date and time.