|
51 | 51 | */ |
52 | 52 | public final class PathUtils { |
53 | 53 |
|
54 | | - /** |
55 | | - * Accumulates file tree information in a {@link AccumulatorPathVisitor}. |
56 | | - * |
57 | | - * @param directory The directory to accumulate information. |
58 | | - * @param maxDepth See {@link Files#walkFileTree(Path,Set,int,FileVisitor)}. |
59 | | - * @param linkOptions Options indicating how symbolic links are handled. |
60 | | - * @param fileVisitOptions See {@link Files#walkFileTree(Path,Set,int,FileVisitor)}. |
61 | | - * @throws IOException if an I/O error is thrown by a visitor method. |
62 | | - * @return file tree information. |
63 | | - */ |
64 | | - private static AccumulatorPathVisitor accumulate(final Path directory, final int maxDepth, |
65 | | - final LinkOption[] linkOptions, final FileVisitOption[] fileVisitOptions) throws IOException { |
66 | | - return visitFileTree(AccumulatorPathVisitor.withLongCounters(), directory, |
67 | | - toFileVisitOptionSet(fileVisitOptions), maxDepth); |
68 | | - } |
69 | | - |
70 | 54 | /** |
71 | 55 | * Private worker/holder that computes and tracks relative path names and their equality. We reuse the sorted |
72 | 56 | * relative lists when comparing directories. |
@@ -145,6 +129,22 @@ private RelativeSortedPaths(final Path dir1, final Path dir2, final int maxDepth |
145 | 129 | */ |
146 | 130 | public static final OpenOption[] EMPTY_OPEN_OPTION_ARRAY = new OpenOption[0]; |
147 | 131 |
|
| 132 | + /** |
| 133 | + * Accumulates file tree information in a {@link AccumulatorPathVisitor}. |
| 134 | + * |
| 135 | + * @param directory The directory to accumulate information. |
| 136 | + * @param maxDepth See {@link Files#walkFileTree(Path,Set,int,FileVisitor)}. |
| 137 | + * @param linkOptions Options indicating how symbolic links are handled. |
| 138 | + * @param fileVisitOptions See {@link Files#walkFileTree(Path,Set,int,FileVisitor)}. |
| 139 | + * @throws IOException if an I/O error is thrown by a visitor method. |
| 140 | + * @return file tree information. |
| 141 | + */ |
| 142 | + private static AccumulatorPathVisitor accumulate(final Path directory, final int maxDepth, |
| 143 | + final LinkOption[] linkOptions, final FileVisitOption[] fileVisitOptions) throws IOException { |
| 144 | + return visitFileTree(AccumulatorPathVisitor.withLongCounters(), directory, |
| 145 | + toFileVisitOptionSet(fileVisitOptions), maxDepth); |
| 146 | + } |
| 147 | + |
148 | 148 | /** |
149 | 149 | * Cleans a directory including sub-directories without deleting directories. |
150 | 150 | * |
|
0 commit comments