Java 7 新的 IO API - Paths.exists [重复]

2024-01-03

有谁知道发生了什么事path.exists()最新的Java 7 API中的API方法? 我在更改日志中找不到更改,并且在 b123 和 b130 之间,该方法已从 API 中删除。我看到有一个静态Files.exists方法,但我不确定这是否是替代方法。

有没有人足够密切地关注 Java 7 工作,知道应该如何处理这个问题?

谢谢你的帮助。


Files.exists

看看在Files http://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html静态方法的类exists() http://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#exists-java.nio.file.Path-java.nio.file.LinkOption...- and notExists() http://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#notExists-java.nio.file.Path-java.nio.file.LinkOption...-。两者都需要一个Path http://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html.

我猜他们认为这更有意义static http://docs.oracle.com/javase/tutorial/java/javaOO/classvars.html而不是实例方法。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Java 7 新的 IO API - Paths.exists [重复] 的相关文章

随机推荐