|
__init__(self,
dirname,
factory=<class rfc822.Message at 0x40a3f0bc>,
create=True)
Initialize a Maildir instance. |
|
|
|
add(self,
message)
Add message and return assigned key. |
|
|
|
remove(self,
key)
Remove the keyed message; raise KeyError if it doesn't exist. |
|
|
|
discard(self,
key)
If the keyed message exists, remove it. |
|
|
|
__setitem__(self,
key,
message)
Replace the keyed message; raise KeyError if it doesn't exist. |
|
|
|
get_message(self,
key)
Return a Message representation or raise a KeyError. |
|
|
|
get_string(self,
key)
Return a string representation or raise a KeyError. |
|
|
|
get_file(self,
key)
Return a file-like representation or raise a KeyError. |
|
|
|
iterkeys(self)
Return an iterator over keys. |
|
|
|
has_key(self,
key)
Return True if the keyed message exists, False otherwise. |
|
|
|
__len__(self)
Return a count of messages in the mailbox. |
|
|
|
flush(self)
Write any pending changes to disk. |
|
|
|
lock(self)
Lock the mailbox. |
|
|
|
unlock(self)
Unlock the mailbox if it is locked. |
|
|
|
close(self)
Flush and close the mailbox. |
|
|
|
list_folders(self)
Return a list of folder names. |
|
|
|
get_folder(self,
folder)
Return a Maildir instance for the named folder. |
|
|
|
add_folder(self,
folder)
Create a folder and return a Maildir instance representing it. |
|
|
|
remove_folder(self,
folder)
Delete the named folder, which must be empty. |
|
|
|
clean(self)
Delete old files in "tmp". |
|
|
|
_create_tmp(self)
Create a file in the tmp subdirectory and open and return it. |
|
|
|
_refresh(self)
Update table of contents mapping. |
|
|
|
_lookup(self,
key)
Use TOC to return subpath for given key, or raise a KeyError. |
|
|
|
next(self)
Return the next message in a one-time iteration. |
|
|
Inherited from Mailbox :
__contains__ ,
__delitem__ ,
__getitem__ ,
__iter__ ,
clear ,
get ,
items ,
iteritems ,
itervalues ,
keys ,
pop ,
popitem ,
update ,
values
|