RFR: 8214248: (fs) Files:mismatch spec clarifications
Alan Bateman
alanb at openjdk.org
Sat Aug 19 19:11:27 UTC 2023
On Fri, 18 Aug 2023 23:11:43 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Clarify that `Files::mismatch` does not access the file system if both paths locate the same file. Add package documentation about file operations on directories being implementation specific.
src/java.base/share/classes/java/nio/file/package-info.java line 90:
> 88: * to whether such operations will succeed. These operations will either work
> 89: * or throw an {@code IOException}. </p>
> 90: *
I'm not sure about this wording or section title. I think the point is that a file path can locate any time of file, be it a regular file, directory, sym link, or something else. There is nothing to prevent attempting a file operation on any file but it may be that some operations aren't applicable or supported on some file types. It may be that this part should be a separate issue/PR as it's nothing to do with Files.mismatch.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15350#discussion_r1299241910
More information about the nio-dev
mailing list