if (file.isDirectory()) {
SVNFileType fType = SVNFileType.getType(file); if (fType == SVNFileType.DIRECTORY) {
    private void reportStatus(SVNDirectory dir, String entryName, boolean ignoreRootEntry, boolean recursive) throws SVNException {        SVNEntries entries = dir.getEntries();        if (!(myTarget != null && (dir == myWCAccess.getAnchor()) || "".equals(dir.getPath()))) {            // if we have a target -> no externals from anchor should be collected by default.            SVNExternalInfo[] externals = SVNWCAccess.parseExternals(dir.getPath(), dir.getProperties("", false).getPropertyValue(SVNProperty.EXTERNALS));            for (int i = 0; i < externals.length; i++) {                SVNExternalInfo external = externals[i];                myExternalsMap.put(external.getPath(), external);            }        }        if (entryName != null) {            SVNEntry entry = entries.getEntry(entryName, true);            if (entry != null) {                sendVersionedStatus(dir, entryName);            } else if (dir.getFile(entryName, false).exists()) {                sendUnversionedStatus(dir, entryName);            }            return;        }        File[] ioFiles = dir.getRoot().listFiles();        if (ioFiles != null)  {            Arrays.sort(ioFiles, new Comparator() {                public int compare(Object o1, Object o2) {                    File f1 = (File) o1;                    File f2 = (File) o2;                    int f1type = SVNFileType.getType(f1).getID();                    int f2type = SVNFileType.getType(f2).getID();                    return f1type == f2type ? 0 : (f1type > f2type) ? -1 : 1;                }            });        }        for (int i = 0; ioFiles != null && i < ioFiles.length; i++) {            File ioFile = ioFiles[i];            String fileName = ioFile.getName();            if (".svn".equals(fileName) || entries.getEntry(fileName, false) != null) {                continue;            }            sendUnversionedStatus(dir, fileName);        }        if (!ignoreRootEntry) {            sendVersionedStatus(dir, "");        }        for(Iterator ents = entries.entries(false); ents.hasNext();) {            SVNEntry childEntry = (SVNEntry) ents.next();            if ("".equals(childEntry.getName())) {                continue;            }            File file = dir.getFile(childEntry.getName(), false);            if (file.isDirectory()) {                SVNDirectory childDir = dir.getChildDirectory(childEntry.getName());                if (childDir != null && recursive) {                    reportStatus(childDir, null, false, recursive);                } else {                    sendVersionedStatus(dir, childEntry.getName());                }            } else {                sendVersionedStatus(dir, childEntry.getName());            }        }    }