Here you can find the source of isEqualPath(final Path file1, final String topLevelAbsolutePath)
private static boolean isEqualPath(final Path file1, final String topLevelAbsolutePath)
//package com.java2s; import java.nio.file.Path; public class Main { private static boolean isEqualPath(final Path file1, final String topLevelAbsolutePath) { return topLevelAbsolutePath.equals(file1.toAbsolutePath() .toString());/*from www .ja v a 2 s . c o m*/ } }