(final String pattern)
| 49 | } |
| 50 | |
| 51 | @Override |
| 52 | public synchronized Folder[] list(final String pattern) |
| 53 | throws MessagingException { |
| 54 | ListInfo[] li = null; |
| 55 | |
| 56 | li = (ListInfo[])doCommand(new ProtocolCommand() { |
| 57 | @Override |
| 58 | public Object doCommand(IMAPProtocol p) throws ProtocolException { |
| 59 | return p.list("", pattern); |
| 60 | } |
| 61 | }); |
| 62 | |
| 63 | if (li == null) |
| 64 | return new Folder[0]; |
| 65 | |
| 66 | IMAPFolder[] folders = new IMAPFolder[li.length]; |
| 67 | for (int i = 0; i < folders.length; i++) |
| 68 | folders[i] = ((IMAPStore)store).newIMAPFolder(li[i]); |
| 69 | return folders; |
| 70 | } |
| 71 | |
| 72 | @Override |
| 73 | public synchronized Folder[] listSubscribed(final String pattern) |
no test coverage detected