RFR: 8220816: (fs) Files.createDirectory should make it more obvious that it fails when the directory already exists [v6]

Alan Bateman alanb at openjdk.org
Thu Nov 20 09:35:14 UTC 2025


On Thu, 20 Nov 2025 09:23:03 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Having said that, the JBS issue description states that the usage of the word "file" makes it sound like the exception is raised only if a regular file exists 

I think it's best to keep the API docs simple and consistent. I'm sure there are developers that don't think of a directory or sym files as "files" but once you attempt to clarify things then it gets complicated and it could potentially confusing a wider set of developers.

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

PR Comment: https://git.openjdk.org/jdk/pull/28378#issuecomment-3556871476


More information about the nio-dev mailing list