RFR: 8220816: (fs) Files.createDirectory should make it more obvious that it fails when the directory already exists [v3]
Brian Burkhalter
bpb at openjdk.org
Wed Nov 19 18:12:34 UTC 2025
On Tue, 18 Nov 2025 22:14:22 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Slightly changes the specification of `Files.createDirectory` to highlight that it fails if a filesystem entity already exists at the given location.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8220816: Update throws verbiage to match
Commit 5c62cd5 does not (yet) address `throws FileAlreadyExistsException` verbiage for these cases:
1. If a file of that name already exists and the CREATE_NEW option is specified;
2. if the target file exists but cannot be replaced because the REPLACE_EXISTING option is not specified.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28378#issuecomment-3553974779
More information about the nio-dev
mailing list