code: def dump(self, filepath):
          "Attempt to dump an opened stream to path *filepath*."
  
          common.ask_overwrite(filepath)
  
          filename = os.path.basename(filepath)
          file_size = 0
          with open(filepath, 'ab') as f:
              try:
                  while True:
                      buf = self.fd.read(READ_BUFFER)
                      if not buf:
                          break
                      f.write(buf)
                      file_size = file_size + (READ_BUFFER / KB)
                      print("Downloaded {} KB of file '{}'".
                            format(file_size, filename), end='\r')
              except KeyboardInterrupt:
                  self.exit("\nPartial download of file '{}'".format(filepath))
  
          print("\nComplete download of file '{}'".format(filepath)f dump(self, filepath):
          "Attempt to dump an opened stream to path *filepath*."
  
          common.ask_overwrite(filepath)
  
          filename = os.path.basename(filepath)
          file_size = 0
          with open(filepath, 'ab') as f:
              try:
                  while True:
                      buf = self.fd.read(READ_BUFFER)
                      if not buf:
                          break
                      f.write(buf)
                      file_size = file_size + (READ_BUFFER / KB)
                      print("Downloaded {} KB of file '{}'".
                            format(file_size, filename), end='\r')
              except KeyboardInterrupt:
                  self.exit("\nPartial download of file '{}'".format(filepath))
  
          print("\nComplete download of file '{}'".format(filepath))
docs: Attempt to dump an opened stream to path *filepath*.