MCPcopy Index your code
hub / github.com/RustPython/RustPython / add_folder

Method add_folder

Lib/mailbox.py:501–509  ·  view source on GitHub ↗

Create a folder and return a Maildir instance representing it.

(self, folder)

Source from the content-addressed store, hash-verified

499 create=False)
500
501 def add_folder(self, folder):
502 """Create a folder and return a Maildir instance representing it."""
503 path = os.path.join(self._path, '.' + folder)
504 result = Maildir(path, factory=self._factory)
505 maildirfolder_path = os.path.join(path, 'maildirfolder')
506 if not os.path.exists(maildirfolder_path):
507 os.close(os.open(maildirfolder_path, os.O_CREAT | os.O_WRONLY,
508 0o666))
509 return result
510
511 def remove_folder(self, folder):
512 """Delete the named folder, which must be empty."""

Callers

nothing calls this directly

Calls 5

MaildirClass · 0.85
joinMethod · 0.45
existsMethod · 0.45
closeMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected