RFR: 8322166: Files.isReadable/isWritable/isExecutable expensive when file does not exist [v2]
Alan Bateman
alanb at openjdk.org
Mon Dec 18 17:27:43 UTC 2023
On Mon, 18 Dec 2023 17:14:54 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`.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8322166: Address Reviewer comments
Marked as reviewed by alanb (Reviewer).
src/java.base/unix/classes/sun/nio/fs/UnixFileSystemProvider.java line 588:
> 586: UnixPath file = UnixPath.toUnixPath(path);
> 587: file.checkRead();
> 588: return access(file, F_OK) == 0 ? true : false;
This could return `return access(file, F_OK) ==0;`
-------------
PR Review: https://git.openjdk.org/jdk/pull/17133#pullrequestreview-1787393341
PR Review Comment: https://git.openjdk.org/jdk/pull/17133#discussion_r1430453715
More information about the nio-dev
mailing list