pymap.listtree
¶
- class pymap.listtree.ListEntry(name, exists, marked, has_children)[source]¶
An entry in the list results.
- Parameters:
name (str) – The name of the mailbox.
exists (bool) – False if the mailbox should be marked
\Noselect
.marked (bool | None) – True, False, or None if the mailbox should be marked with
\Marked
,\Unmarked
, or neither, respectively.has_children (bool) – Whether the mailbox should be marked
\HasChildren
or\HasNoChildren
.
- class pymap.listtree.ListTree(delimiter)[source]¶
Constructs a tree of hierarchical mailbox names. If a mailbox name has superior names in the heirarchy that do not exist, they are added as “unreferenced”.
- Parameters:
delimiter (str) – The string delimiter for nested mailbox parts.
- set_marked(name, marked=False, unmarked=False)[source]¶
Add or remove the
\Marked
and\Unmarked
mailbox attributes.
- get_renames(from_name, to_name)[source]¶
Return a list of tuples for all mailboxes that must be renamed, for the given rename operation. This should include
(from_name, to_name)
as well as all inferior names in the heirarchy that must also be renamed. Iffrom_name
does not exist, an empty list is returned.See also