public static bool VerifyFile(string filename, ADLResource 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.dlsize;
                checkHash = resource.downloadHash;
            }
            else
            {
                size = resource.size;
                checkHash = resource.hash;
            }

            return VerifyFile(filename, checkHash, size);
        }
Пример #2
0
        public static bool VerifyFile(string filename, ADLResource 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.dlsize;
                checkHash = resource.downloadHash;
            }
            else
            {
                size      = resource.size;
                checkHash = resource.hash;
            }

            return(VerifyFile(filename, checkHash, size));
        }