code: def directory_content_with_hash(directory):
      
      output = {}
      for root, _, filenames in os.walk(directory):
          for filename in filenames:
              p = os.path.join(root, filename)
              file_stat = os.stat(p)
              with open(p, 'rb') as f:
                  output[os.path.relpath(p, directory)] = (hash_file(f), file_stat.st_mode)
      return output
docs: :param directory: directory in which the function list the files
      :return: dict in the form {file: (hash of the file, stat of the file)}