code: def saveAsTextFiles(self, prefix, suffix=None):
          
          self.foreachRDD(
              lambda time_, rdd:
              rdd.saveAsTextFile('{}-{:.0f}{}'.format(
                  prefix, time_ * 1000, suffix if suffix is not None else ''))
          )
docs: Save every RDD as a text file (or sets of text files).
  
          :param string prefix: path prefix of the output
          :param string suffix: file suffix (e.g. '.gz' to enable compression)
  
  
          Example:
  
          >>> from backports import tempfile
          >>> import os, pysparkling
          >>> sc = pysparkling.Context()
          >>> ssc = pysparkling.streaming.StreamingContext(sc, 0.1)
          >>> with tempfile.TemporaryDirectory() as tmp_dir:
          ...     (
          ...         ssc.queueStream([['hello', 'world'], [1, 2]])
          ...         .saveAsTextFiles(os.path.join(tmp_dir, 'textout'))
          ...     )
          ...     ssc.start()
          ...     ssc.awaitTermination(0.25)
          ...     result = sc.textFile(tmp_dir + '*').collect()
          >>> result
          ['hello', 'world', '1', '2']