RFR: 8356127: (fs) UnixFileSystemProvider.implDelete could save a syscall in some cases [v2]

Brian Burkhalter bpb at openjdk.org
Thu May 8 20:10:09 UTC 2025


On Thu, 8 May 2025 19:10:24 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8356127: Add capability check for EISDIR
>
> src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java line 552:
> 
>> 550:      */
>> 551:     static boolean eisdirSupported() {
>> 552:         return (capabilities & SUPPORTS_EISDIR) != 0;
> 
> The approach in this version looks much better. Need to find a better name for the capability and method name as "EISDIR" is supported on all Unix/like platforms. I think we want something to convey unlink detects directories or fails for directories.

Naming updated in [3814a18](https://github.com/openjdk/jdk/pull/25107/commits/3814a184551496b01d9f0f44a514c23aa1e094b7).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25107#discussion_r2080393094


More information about the nio-dev mailing list