String path = "".equals(this.name) ? "" : this.path.toString("/") + "/";
int partCount = this.path.getPartCount() + 1;
for (ZipEntry entry : this.getEntries()) {
if (entry.getName().startsWith(path)) {
IVirtualPath entryPath = new SimplePath(entry.getName());
if ( (entryPath.getPartCount() == partCount && entry.getName().endsWith("/"))) {
String name = entryPath.getPart(partCount-1);
if (!this.directories.contains(name)) this.directories.add(name);
continue;
}
IVirtualPath relativePath = entryPath.getPartCount() > partCount - 1 ? this.path.getRelativePath(entryPath) : entryPath;
if (entryPath.getPartCount() > partCount && relativePath.getPartCount() > 0) {
String name = relativePath.getPart(0);
if (!this.directories.contains(name)) this.directories.add(name);
} else if (entryPath.getPartCount() == partCount) {
this.files.add(entryPath.getPart(partCount-1));
}
}