@Test public void folderExistsTest() { boolean actual = conn.folderExists( "a/b" ); Assert.assertTrue( "Folder B exists", actual ); }
public boolean folderExists( String foldername ) { boolean retval = false; Folder dfolder = null; try { dfolder = getRecursiveFolder( foldername ); if ( dfolder.exists() ) { retval = true; } } catch ( Exception e ) { } finally { try { if ( dfolder != null ) { dfolder.close( false ); } } catch ( Exception e ) { } } return retval; }
MailConnection { public boolean folderExists( String foldername ) { boolean retval = false; Folder dfolder = null; try { dfolder = getRecursiveFolder( foldername ); if ( dfolder.exists() ) { retval = true; } } catch ( Exception e ) { } finally { try { if ( dfolder != null ) { dfolder.close( false ); } } catch ( Exception e ) { } } return retval; } }
MailConnection { public boolean folderExists( String foldername ) { boolean retval = false; Folder dfolder = null; try { dfolder = getRecursiveFolder( foldername ); if ( dfolder.exists() ) { retval = true; } } catch ( Exception e ) { } finally { try { if ( dfolder != null ) { dfolder.close( false ); } } catch ( Exception e ) { } } return retval; } MailConnection( LogChannelInterface log, int protocol, String server, int port, String username,
    String password, boolean usessl, boolean useproxy, String proxyusername ); }
MailConnection { public boolean folderExists( String foldername ) { boolean retval = false; Folder dfolder = null; try { dfolder = getRecursiveFolder( foldername ); if ( dfolder.exists() ) { retval = true; } } catch ( Exception e ) { } finally { try { if ( dfolder != null ) { dfolder.close( false ); } } catch ( Exception e ) { } } return retval; } MailConnection( LogChannelInterface log, int protocol, String server, int port, String username,
    String password, boolean usessl, boolean useproxy, String proxyusername ); boolean isConnected(); boolean isUseSSL(); boolean isUseProxy(); String getProxyUsername(); Store getStore(); Folder getFolder(); void connect(); void openFolder( boolean write ); void openFolder( String foldername, boolean write ); void openFolder( String foldername, boolean defaultFolder, boolean write ); void clearFilters(); void disconnect(); void closeFolder( boolean expunge ); SearchTerm getSearchTerm(); void setSubjectTerm( String subject, boolean notTerm ); void setBodyTerm( String bodyfilter, boolean notTerm ); void setSenderTerm( String sender, boolean notTerm ); void setReceipientTerm( String receipient ); void setReceivedDateTermEQ( Date receiveddate ); void setReceivedDateTermLT( Date futureDate ); void setReceivedDateTermGT( Date pastDate ); void setReceivedDateTermBetween( Date beginDate, Date endDate ); void setFlagTermNew(); void setFlagTermOld(); void setFlagTermRead(); void setFlagTermUnread(); void setFlagTermFlagged(); void setFlagTermNotFlagged(); void setFlagTermDraft(); void setFlagTermNotDraft(); void retrieveMessages(); void disconnect( boolean expunge ); void saveMessageContentToFile( String filename, String foldername ); void saveAttachedFiles( String foldername ); void saveAttachedFiles( String foldername, Pattern pattern ); void deleteMessage(); void setDestinationFolder( String foldername, boolean createFolder ); void moveMessage(); String getFolderName(); String getServer(); int getProtocol(); Message[] getMessages(); void fetchNext(); Message getMessage(); int getMessagesCount(); void updateSavedMessagesCounter(); int getSavedMessagesCounter(); int getSavedAttachedFilesCounter(); void updateSavedAttachedFilesCounter(); int getDeletedMessagesCounter(); int getMovedMessagesCounter(); void deleteMessages( boolean setCounter ); void moveMessages(); boolean folderExists( String foldername ); String[] returnAllFolders( Folder folder ); String[] returnAllFolders(); String[] returnAllFolders( String folder ); String getMessageBody(); String getMessageBody( Message m ); String getMessageBodyContentType( Message m ); boolean isMessageNew(); boolean isMessageNew( Message msg ); boolean isMessageRead(); boolean isMessageRead( Message msg ); boolean isMessageFlagged(); boolean isMessageFlagged( Message msg ); boolean isMessageDeleted(); boolean isMessageDeleted( Message msg ); boolean isMessageDraft(); boolean isMessageDraft( Message msg ); String toString(); int getAttachedFilesCount( Pattern pattern ); int getAttachedFilesCount( Message message, Pattern pattern ); }
MailConnection { public boolean folderExists( String foldername ) { boolean retval = false; Folder dfolder = null; try { dfolder = getRecursiveFolder( foldername ); if ( dfolder.exists() ) { retval = true; } } catch ( Exception e ) { } finally { try { if ( dfolder != null ) { dfolder.close( false ); } } catch ( Exception e ) { } } return retval; } MailConnection( LogChannelInterface log, int protocol, String server, int port, String username,
    String password, boolean usessl, boolean useproxy, String proxyusername ); boolean isConnected(); boolean isUseSSL(); boolean isUseProxy(); String getProxyUsername(); Store getStore(); Folder getFolder(); void connect(); void openFolder( boolean write ); void openFolder( String foldername, boolean write ); void openFolder( String foldername, boolean defaultFolder, boolean write ); void clearFilters(); void disconnect(); void closeFolder( boolean expunge ); SearchTerm getSearchTerm(); void setSubjectTerm( String subject, boolean notTerm ); void setBodyTerm( String bodyfilter, boolean notTerm ); void setSenderTerm( String sender, boolean notTerm ); void setReceipientTerm( String receipient ); void setReceivedDateTermEQ( Date receiveddate ); void setReceivedDateTermLT( Date futureDate ); void setReceivedDateTermGT( Date pastDate ); void setReceivedDateTermBetween( Date beginDate, Date endDate ); void setFlagTermNew(); void setFlagTermOld(); void setFlagTermRead(); void setFlagTermUnread(); void setFlagTermFlagged(); void setFlagTermNotFlagged(); void setFlagTermDraft(); void setFlagTermNotDraft(); void retrieveMessages(); void disconnect( boolean expunge ); void saveMessageContentToFile( String filename, String foldername ); void saveAttachedFiles( String foldername ); void saveAttachedFiles( String foldername, Pattern pattern ); void deleteMessage(); void setDestinationFolder( String foldername, boolean createFolder ); void moveMessage(); String getFolderName(); String getServer(); int getProtocol(); Message[] getMessages(); void fetchNext(); Message getMessage(); int getMessagesCount(); void updateSavedMessagesCounter(); int getSavedMessagesCounter(); int getSavedAttachedFilesCounter(); void updateSavedAttachedFilesCounter(); int getDeletedMessagesCounter(); int getMovedMessagesCounter(); void deleteMessages( boolean setCounter ); void moveMessages(); boolean folderExists( String foldername ); String[] returnAllFolders( Folder folder ); String[] returnAllFolders(); String[] returnAllFolders( String folder ); String getMessageBody(); String getMessageBody( Message m ); String getMessageBodyContentType( Message m ); boolean isMessageNew(); boolean isMessageNew( Message msg ); boolean isMessageRead(); boolean isMessageRead( Message msg ); boolean isMessageFlagged(); boolean isMessageFlagged( Message msg ); boolean isMessageDeleted(); boolean isMessageDeleted( Message msg ); boolean isMessageDraft(); boolean isMessageDraft( Message msg ); String toString(); int getAttachedFilesCount( Pattern pattern ); int getAttachedFilesCount( Message message, Pattern pattern );  }