private void navigateInto(File directory, Hashtable<String, Vector<?>> pageBranch) throws IOException { File[] files = directory.listFiles(NOT_HIDDEN); if (files != null) { Arrays.sort(files, PathFileComparator.PATH_COMPARATOR); for (File file : files) { if (file.isDirectory() || isSupported(file)) { generateDocumentNode(file, pageBranch); } } } }
/** * Compares to file paths to see if they are the same based on the OS that is being used * * @param path1 * @param path2 * @return */ public static boolean areFilePathsSame(final String path1, final String path2) { return PathFileComparator.PATH_SYSTEM_COMPARATOR.compare(new File(path1), new File(path2)) == 0 ? true : false; }