Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/java.base/share/classes/java/nio/file/Files.java
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@ public static Path createFile(Path path, FileAttribute<?>... attrs)
}

/**
* Creates a new directory. The check for the existence of the file and the
* Creates a new directory, failing if the file or directory already exists.
* The check for the existence of the file and the
* creation of the directory if it does not exist are a single operation
* that is atomic with respect to all other filesystem activities that might
* affect the directory. The {@link #createDirectories createDirectories}
Expand All @@ -636,8 +637,9 @@ public static Path createFile(Path path, FileAttribute<?>... attrs)
* if the array contains an attribute that cannot be set atomically
* when creating the directory
* @throws FileAlreadyExistsException
* if a directory could not otherwise be created because a file of
* that name already exists <i>(optional specific exception)</i>
* if a directory could not otherwise be created because a file or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is pre-existing wording, but I don't know that "otherwise" has any meaning here.
It reads the same whether "otherwise" is present or not.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know that "otherwise" has any meaning here.

No, I also don't think it does.

* directory of that name already exists
* <i>(optional specific exception)</i>
* @throws IOException
* if an I/O error occurs or the parent directory does not exist
*/
Expand Down