I am developing a desktop application in AIR wherein we have a requirement for Live Update. I need a mechanism by which I can check the last modified date time of a file and if a new version is available, I need to download it.
I am able to download the file from remote server. But the main issue is reading the last modified date time. Is there any way to get this information in AIR.
Any help/suggestions would be highly appreciated.
Hitesh Patel (India)
This depends on the type of server from which you are downloading the files. For example, if you are downloading the files from an HTTP server, and the server provides "Last-Modified" values in the HTTP response headers, you could use the following ActionScript code to determine those values:
var urlReq:URLRequest = new URLRequest("http://www.example.com/");
var urlStream:URLStream = new URLStream();
private function statusListener(event:HTTPStatusEvent):void
for each(var header:URLRequestHeader in event.responseHeaders)
if(header.name == "Last-Modified")
Thanks a lot... This really worked..