parameters: (self, folder)
return_statement: return result
docstring: Create a folder and return a Maildir instance representing it.
docstring_summary: Create a folder and return a Maildir instance representing it.
docstring_tokens: Create a folder and return a Maildir instance representing it .
function: def add_folder(self, folder):
          """Create a folder and return a Maildir instance representing it."""
          path = os.path.join(self._path, '.' + folder)
          result = Maildir(path, factory=self._factory)
          maildirfolder_path = os.path.join(path, 'maildirfolder')
          if not os.path.exists(maildirfolder_path):
              os.close(os.open(maildirfolder_path, os.O_CREAT | os.O_WRONLY,
                  0666))
          return result
function_tokens: def add_folder ( self , folder ) : path = os . path . join ( self . _path , '.' + folder ) result = Maildir ( path , factory = self . _factory ) maildirfolder_path = os . path . join ( path , 'maildirfolder' ) if not os . path . exists ( maildirfolder_path ) : os . close ( os . open ( maildirfolder_path , os . O_CREAT | os . O_WRONLY , 0666 ) ) return result