code: def _to_dir(self, file_generator):
          
          for f in file_generator:
              outpath = self._output_path(f.source, file_generator.to_format)
  
              if not os.path.exists(os.path.dirname(outpath)):
                  os.makedirs(os.path.dirname(outpath))
  
              with open(outpath, mode="w") as outfile:
                  f.write(outfile, file_generator.to_format)
docs: Convert files to directory.
          :return: None
          :rtype: :py:obj:`None`