Java 7 新的 IO API - Paths.exists [英] Java 7 new IO API - Paths.exists
问题描述
有谁知道最新的 Java 7 API 中的 path.exists()
API 方法发生了什么?我在更改日志中找不到更改,并且在 b123 和 b130 之间,该方法已从 API 中删除.我看到有一个静态的 Files.exists
方法,但我不确定那是更换与否.
Does anyone know what happened to the path.exists()
API method in the latest Java 7 API?
I cannot find the change in the change logs, and between b123 and b130, the method has been removed from the API.I see that there is a static Files.exists
method but I'm not sure if that is the replacement or not.
是否有人密切关注 Java 7 的工作,知道应该如何处理?
Is anyone following the Java 7 work close enough to know how this should be handled?
感谢您的帮助.
推荐答案
Files.exists
查看文件
静态方法类 exists()
和 <代码>notExists().两者都采用 Path
.
我猜他们认为 静态 而不是实例方法.
I guess they decided it made more sense as a static rather than instance method.
这篇关于Java 7 新的 IO API - Paths.exists的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!