Package org.apache.commons.io.file
Class PathUtils.RelativeSortedPaths
- java.lang.Object
-
- org.apache.commons.io.file.PathUtils.RelativeSortedPaths
-
- Enclosing class:
- PathUtils
private static final class PathUtils.RelativeSortedPaths extends java.lang.ObjectPrivate worker/holder that computes and tracks relative path names and their equality. We reuse the sorted relative lists when comparing directories.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) booleanequals(package private) java.util.List<java.nio.file.Path>relativeFileList1(package private) java.util.List<java.nio.file.Path>relativeFileList2
-
Constructor Summary
Constructors Modifier Constructor Description privateRelativeSortedPaths(java.nio.file.Path dir1, java.nio.file.Path dir2, int maxDepth, java.nio.file.LinkOption[] linkOptions, java.nio.file.FileVisitOption[] fileVisitOptions)Constructs and initializes a new instance by accumulating directory and file info.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static booleanequalsIgnoreFileSystem(java.nio.file.Path path1, java.nio.file.Path path2)private static booleanequalsIgnoreFileSystem(java.util.List<java.nio.file.Path> list1, java.util.List<java.nio.file.Path> list2)Compares lists of paths regardless of their file systems.(package private) static java.lang.StringextractKey(java.lang.String separator, java.lang.String string)
-
-
-
Constructor Detail
-
RelativeSortedPaths
private RelativeSortedPaths(java.nio.file.Path dir1, java.nio.file.Path dir2, int maxDepth, java.nio.file.LinkOption[] linkOptions, java.nio.file.FileVisitOption[] fileVisitOptions) throws java.io.IOExceptionConstructs and initializes a new instance by accumulating directory and file info.- Parameters:
dir1- First directory to compare.dir2- Seconds directory to compare.maxDepth- SeeFiles.walkFileTree(Path,Set,int,FileVisitor).linkOptions- Options indicating how symbolic links are handled.fileVisitOptions- SeeFiles.walkFileTree(Path,Set,int,FileVisitor).- Throws:
java.io.IOException- if an I/O error is thrown by a visitor method.
-
-
Method Detail
-
equalsIgnoreFileSystem
private static boolean equalsIgnoreFileSystem(java.util.List<java.nio.file.Path> list1, java.util.List<java.nio.file.Path> list2)Compares lists of paths regardless of their file systems.- Parameters:
list1- the first list.list2- the second list.- Returns:
- whether the lists are equal.
-
equalsIgnoreFileSystem
private static boolean equalsIgnoreFileSystem(java.nio.file.Path path1, java.nio.file.Path path2)
-
extractKey
static java.lang.String extractKey(java.lang.String separator, java.lang.String string)
-
-