AdvancedLauncher.Management.Internal.UpdateManager.GetFileLength C# (CSharp) Method

GetFileLength() private static method

Returns Length of remote file
private static GetFileLength ( Uri url ) : double
url System.Uri Remote file Uri
return double
        private static double GetFileLength(Uri url)
        {
            System.Net.WebRequest req = WebClientEx.CreateHTTPRequest(url);
            req.Method = "HEAD";
            double ContentLength = 0;
            using (System.Net.WebResponse resp = req.GetResponse()) {
                double.TryParse(resp.Headers.Get("Content-Length"), out ContentLength);
            }
            return ContentLength;
        }