parameters: (path, blocksize=1 << 20)
return_statement: return h, length
docstring: Return (hash, length) for path using hashlib.sha256()
docstring_summary: Return (hash, length) for path using hashlib.sha256()
docstring_tokens: Return ( hash length ) for path using hashlib . sha256 ()
function: def hash_file(path, blocksize=1 << 20):
      # type: (str, int) -> Tuple[Any, int]
      """Return (hash, length) for path using hashlib.sha256()
      """
  
      h = hashlib.sha256()
      length = 0
      with open(path, 'rb') as f:
          for block in read_chunks(f, size=blocksize):
              length += len(block)
              h.update(block)
      return h, length
function_tokens: def hash_file ( path , blocksize = 1 << 20 ) : # type: (str, int) -> Tuple[Any, int] h = hashlib . sha256 ( ) length = 0 with open ( path , 'rb' ) as f : for block in read_chunks ( f , size = blocksize ) : length += len ( block ) h . update ( block ) return h , length