File[] children = file.getParentFile().listFiles();
File[] children = file.getParentFile() != null ? file.getParentFile().listFiles() : null;
    public static SVNFileType getType(File file) {        if (file == null) {            return SVNFileType.UNKNOWN;        }        if (!SVNFileUtil.isWindows) {            String absolutePath = file.getAbsolutePath();            String canonicalPath;            try {                canonicalPath = file.getCanonicalPath();            } catch (IOException e) {                canonicalPath = file.getAbsolutePath();            }            if (!file.exists()) {                File[] children = file.getParentFile().listFiles();                for (int i = 0; children != null && i < children.length; i++) {                    File child = children[i];                    if (child.getName().equals(file.getName())) {                        if (SVNFileUtil.isSymlink(file)) {                               return SVNFileType.SYMLINK;                        }                    }                }            } else if (!absolutePath.equals(canonicalPath) && SVNFileUtil.isSymlink(file)) {                return SVNFileType.SYMLINK;            }        }        if (file.isFile()) {            return SVNFileType.FILE;        } else if (file.isDirectory()) {            return SVNFileType.DIRECTORY;        } else if (!file.exists()) {            return SVNFileType.NONE;        }        return SVNFileType.UNKNOWN;    }