void (VirtualFile dir, int depth) { if (!(dir instanceof NewVirtualFile)) { System.out.println(dir.getPresentableUrl() + ": not in db (" + dir.getClass().getName() + ")"); return; } List<VirtualFile> dirs = new ArrayList<>(); int inDb = 0, contentInDb = 0, nullChildren = 0; PersistentFS persistentFS = PersistentFS.getInstance(); if (persistentFS.wereChildrenAccessed(dir)) { for (String name : persistentFS.listPersisted(dir)) { inDb++; NewVirtualFile child = ((NewVirtualFile)dir).refreshAndFindChild(name); if (child == null) { nullChildren++; continue; } if (child.isDirectory()) { dirs.add(child); } else if (PersistentFS.getInstance().getCurrentContentId(child) != 0) { contentInDb++; } } } System.out.print(dir.getPresentableUrl() + ": " + inDb + " children in db"); if (contentInDb > 0) { System.out.print(", content of " + contentInDb + " files in db"); } if (nullChildren > 0) { System.out.print(", " + nullChildren + " invalid files in db"); } System.out.println(); if (depth > 10) { System.out.println("too deep, skipping children"); } else { for (VirtualFile childDir : dirs) { dumpChildrenInDbRecursively(childDir, depth+1); } } }