RFR: 8322166: Files.isReadable/isWritable/isExecutable expensive when file does not exist
Brian Burkhalter
bpb at openjdk.org
Fri Dec 15 22:55:48 UTC 2023
On Fri, 15 Dec 2023 22:49:33 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Add `isReadable`, `isWritable`, and `isExecutable` methods to `AbstractFileSystemProvider` and overrides to `UnixFileSystemProvider` and use these in the respective `Files` methods when the provider is an `AbstractFileSystemProvider`.
The `access` method is modified to return the value of `errno` instead of relying on throwing an exception to denote success or failure. The `exists` method is changed to use `access` and the `exists0` native method is removed. The Windows implementation is not affected by the initial commit.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17133#issuecomment-1858580778
More information about the nio-dev
mailing list