// MD5SumEquals Check if the MD5 checksum of a file equals the specified value
MD5SumEquals Check if the MD5 checksum of a file equals the specified value
// MD5SumEquals Check if the MD5 checksum of a file equals the specified value
func MD5SumEquals(file string, md5 string) bool {
	_, err := os.Stat(file)
	if err != nil && os.IsNotExist(err) {
		return false
	}
	fileMD5, err := md5sum(file)
	if err != nil {
		return false
	}
	return fileMD5 == md5
}
func MD5SumEquals ( file string , md5 string ) bool { _ , err := os . Stat ( file ) if err != nil && os . IsNotExist ( err ) { return false } fileMD5 , err := md5sum ( file ) if err != nil { return false } return fileMD5 == md5 }
MD5SumEquals Check if the MD5 checksum of a file equals the specified value
MD5SumEquals Check if the MD5 checksum of a file equals the specified value