code: def check(self, digest):
          
          path = self.get_file_path(digest)
          if self._calc_digest(path) != digest:
              self.logger.warning("found corrupted file: '{0}'".format(path))
              return False
          return True
docs: Check the integrity of the file with the given digest
  
            Args:
              digest -- digest of the file to check
            Returns:
              True if the file is not corrupted