code: def new(self, filename, encoding, text, default_content=False,
              empty=False):
          
          finfo = self.create_new_editor(filename, encoding, text,
                                         set_current=False, new=True)
          finfo.editor.set_cursor_position('eof')
          if not empty:
              finfo.editor.insert_text(os.linesep)
          if default_content:
              finfo.default = True
              finfo.editor.document().setModified(False)
          return finfo
docs: Create new filename with *encoding* and *text*