From b371e85e4affba825426db5bb3e64b65f5f0b68e Mon Sep 17 00:00:00 2001 From: Menno Smits Date: Tue, 30 Jun 2015 13:27:43 +1200 Subject: [PATCH] Cleaned up list_folders docs Fixes #146. --- imapclient/imapclient.py | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/imapclient/imapclient.py b/imapclient/imapclient.py index 8fc9956..705d418 100644 --- a/imapclient/imapclient.py +++ b/imapclient/imapclient.py @@ -294,18 +294,22 @@ class IMAPClient(object): """Get a listing of folders on the server as a list of ``(flags, delimiter, name)`` tuples. - Calling list_folders with no arguments will list all - folders. - - Specifying *directory* will limit returned folders to that - base directory. Specifying *pattern* will limit returned - folders to those with matching names. The wildcards are - supported in *pattern*. ``*`` matches zero or more of any - character and ``%`` matches 0 or more characters except the - folder delimiter. - - Folder names are always returned as unicode strings, and decoded from - modifier utf-7, except if folder_decode is not set. + Specifying *directory* will limit returned folders to the + given base directory. The directory and any child directories + will returned. + + Specifying *pattern* will limit returned folders to those with + matching names. The wildcards are supported in + *pattern*. ``*`` matches zero or more of any character and + ``%`` matches 0 or more characters except the folder + delimiter. + + Calling list_folders with no arguments will recursively list + all folders available for the logged in user. + + Folder names are always returned as unicode strings, and + decoded from modified UTF-7, except if folder_decode is not + set. """ return self._do_list('LIST', directory, pattern) @@ -333,10 +337,9 @@ class IMAPClient(object): This is a *deprecated* Gmail-specific IMAP extension (See https://developers.google.com/gmail/imap_extensions#xlist_is_deprecated - for more information). - It is the responsibility of the caller to either check for ``XLIST`` - in the server capabilites, or to handle the error if the server - doesn't support this extension. + for more information). It is the responsibility of the caller + to either check for ``XLIST`` in the server capabilites, or to + handle the error if the server doesn't support this extension. The *directory* and *pattern* arguments are as per list_folders(). -- 2.43.0