RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks
Alan Bateman
alanb at openjdk.org
Fri Sep 6 07:50:49 UTC 2024
On Thu, 5 Sep 2024 21:05:38 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Make explicit how the `java.io.File` methods `isDirectory`, `isFile`, and `isHidden` behave when the `File` represents a symbolic link.
I think the scope of this is broader as it applies to FIS/FOS/RAF constructors and all File ops. In the java.nio.file package description there is a paragraph on how file operations behave with symbol links and maybe we could link to that from the class descriptions. The main thing is that sym links should be transparent with the exception of a few operations (delete and rename/move).
The scenario of a sym link to a "hidden file" or a "hidden" sym link to something else might need a bit more thought before putting anything into normative text. It may be that we end up with something in an implNote on this.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20878#issuecomment-2333455756
More information about the core-libs-dev
mailing list