| 88 | } |
| 89 | |
| 90 | Array * IMAPNamespaceItem::componentsForPath(String * path) |
| 91 | { |
| 92 | Array * components; |
| 93 | |
| 94 | if (path->hasPrefix(mPrefix)) { |
| 95 | path = path->substringFromIndex(mPrefix->length()); |
| 96 | } |
| 97 | if (mDelimiter == 0) { |
| 98 | return Array::arrayWithObject(path); |
| 99 | } |
| 100 | components = path->componentsSeparatedByString(String::stringWithUTF8Format("%c", mDelimiter)); |
| 101 | components = decodedComponents(components); |
| 102 | if (components->count() > 0) { |
| 103 | if (((String *) components->objectAtIndex(0))->length() == 0) { |
| 104 | components->removeObjectAtIndex(0); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | return components; |
| 109 | } |
| 110 | |
| 111 | bool IMAPNamespaceItem::containsFolder(String * folder) |
| 112 | { |
no test coverage detected