Here you can find the source of isSame(Path expected, Path actual)
Parameter | Description |
---|---|
expected | expected path. |
actual | actual path. |
Parameter | Description |
---|---|
IOException | if something goes wrong. |
public static boolean isSame(Path expected, Path actual) throws IOException
//package com.java2s; import java.io.IOException; import java.nio.file.*; public class Main { /**//from w w w .j av a2s . com * Tests if two paths locate the same file. * * @param expected expected path. * @param actual actual path. * @return true if, and only if, the two paths locate the same file * @throws IOException if something goes wrong. */ public static boolean isSame(Path expected, Path actual) throws IOException { return Files.isSameFile(expected, actual); } }