RFR: 8283335 : Add exists and readAttributesIfExists methods to FileSystemProvider

Alan Bateman alanb at openjdk.org
Thu Jun 23 07:21:59 UTC 2022


On Wed, 22 Jun 2022 22:18:05 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> I think that this is the only use of `stat2()`. It could be deleted if this method were replaced with this:

The purpose of these additions to the SPI is to improve the performance of user facing methods that don't throw an exception when the file doesn't exist. It needs a stat/equivalent that doesn't throw so this is the reason for stat2. The equivalent on Windows will need to added too.

-------------

PR: https://git.openjdk.org/jdk/pull/9249


More information about the nio-dev mailing list