public static bool VerifyFile(string filename, DependencyResource resource) { // Get file info. FileInfo f = new FileInfo(filename); // Get the size and hash we're checking against. long size = 0; string checkHash = ""; if (f.Extension.Equals(".lzma")) { size = resource.downloadSize; checkHash = resource.downloadHash; } else { size = resource.size; checkHash = resource.hash; } return VerifyFile(filename, checkHash, size); }
public static bool VerifyFile(string filename, DependencyResource resource) { // Get file info. FileInfo f = new FileInfo(filename); // Get the size and hash we're checking against. long size = 0; string checkHash = ""; if (f.Extension.Equals(".lzma")) { size = resource.downloadSize; checkHash = resource.downloadHash; } else { size = resource.size; checkHash = resource.hash; } return(VerifyFile(filename, checkHash, size)); }