MCPcopy Create free account
hub / github.com/M66B/FairEmail / getSeparator

Method getSeparator

app/src/main/java/com/sun/mail/imap/IMAPFolder.java:687–712  ·  view source on GitHub ↗

Get the separator character.

()

Source from the content-addressed store, hash-verified

685 * Get the separator character.
686 */
687 @Override
688 public synchronized char getSeparator() throws MessagingException {
689 if (separator == UNKNOWN_SEPARATOR) {
690 ListInfo[] li = null;
691
692 li = (ListInfo[])doCommand(new ProtocolCommand() {
693 @Override
694 public Object doCommand(IMAPProtocol p)
695 throws ProtocolException {
696 // REV1 allows the following LIST format to obtain
697 // the hierarchy delimiter of non-existent folders
698 if (p.isREV1()) // IMAP4rev1
699 return p.list(fullName, "");
700 else // IMAP4, note that this folder must exist for this
701 // to work :(
702 return p.list("", fullName);
703 }
704 });
705
706 if (li != null)
707 separator = li[0].separator;
708 else
709 separator = '/'; // punt !
710 }
711 return separator;
712 }
713
714 /**
715 * Get the type of this folder.

Callers 5

getNameMethod · 0.95
getParentMethod · 0.95
doListMethod · 0.95
createMethod · 0.95
getFolderMethod · 0.95

Calls 1

doCommandMethod · 0.95

Tested by

no test coverage detected