Java NIO - How is Files.isSameFile different from Path.equals

前端 未结 4 776
臣服心动
臣服心动 2021-02-14 03:50

I could not understand how java.nio.file.Files.isSameFile method is different from java.nio.file.Path.equals method.

Could anybody please tell how they are different?

4条回答
  •  温柔的废话
    2021-02-14 04:27

    isSameFile is from java.nio.file.Files and Path.equals is from java.nio.file.Path

    isSameFile --> Tests if two paths locate the same file. ie) checks two Path objects are for the same file equals --> Tests this path for equality with the given object.

提交回复
热议问题