I\'m downloading an entire directory from a web server. It works OK, but I can\'t figure how to get the file size before download to compare if it was updated on the server
Also if the server you are connecting to supports it, look at Etags and the If-Modified-Since and If-None-Match headers.
Using these will take advantage of the webserver's caching rules and will return a 304 Not Modified status code if the content hasn't changed.