/** * Gets the directory listing for a path and invokes * {@link #processPaths(PathData, PathData...)} * @param item {@link PathData} for directory to recurse into * @throws IOException if anything goes wrong... */ protected void recursePath(PathData item) throws IOException { try { depth++; if (isSorted()) { // use the non-iterative method for listing because explicit sorting is // required. Iterators not guaranteed to return sorted elements processPaths(item, item.getDirectoryContents()); } else { processPaths(item, item.getDirectoryContentsIterator()); } } finally { depth--; } }