void () { VirtualFile zip = createJar( "/", "a", "a/b", "a/b/c.txt", "x\\y\\z.txt", "/x/f.txt", "d1/aB", "d1/ab", "D2/f1", "//d2//f2", "empty/", "w/../W"); VirtualFile jarRoot = JarFileSystem.getInstance().getJarRootForLocalFile(zip); assertNotNull(jarRoot); int prefixLength = zip.getPath().length() + JarFileSystem.JAR_SEPARATOR.length(); List<String> entries = new ArrayList<>(); VfsUtilCore.visitChildrenRecursively(jarRoot, new VirtualFileVisitor<>() { @Override public boolean visitFile(@NotNull VirtualFile file) { if (!jarRoot.equals(file)) { String path = file.getPath().substring(prefixLength); entries.add(file.isDirectory() ? path + '/' : path); } return true; } }); assertThat(entries).containsExactlyInAnyOrder( "a/", "a/b/", "a/b/c.txt", "x/", "x/y/", "x/f.txt", "x/y/z.txt", "d1/", "d1/aB", "d1/ab", "D2/", "D2/f1", "d2/", "d2/f2", "empty/"); }