8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks

Reviewed-by: djelinski, alanb
This commit is contained in:
Brian Burkhalter 2024-09-17 15:50:32 +00:00
parent f87701635f
commit 64e3a9ee91
4 changed files with 63 additions and 20 deletions

View file

@ -101,8 +101,12 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
/**
* Creates a random access file stream to read from, and optionally
* to write to, a file with the specified pathname. A new
* {@link FileDescriptor} object is created to represent the
* to write to, a file with the specified pathname. If the file exists
* it is opened; if it does not exist and write mode is specified, a
* new file is created.
* {@linkplain java.nio.file##links Symbolic links}
* are automatically redirected to the <i>target</i> of the link.
* A new {@link FileDescriptor} object is created to represent the
* connection to the file.
*
* <p> The {@code mode} argument specifies the access mode with which the
@ -146,9 +150,14 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
}
/**
* Creates a random access file stream to read from, and optionally to
* write to, the file specified by the {@link File} argument. A new {@link
* FileDescriptor} object is created to represent this file connection.
* Creates a random access file stream to read from, and optionally
* to write to, the file specified by the {@link File} argument. If
* the file exists it is opened; if it does not exist and write mode
* is specified, a new file is created.
* {@linkplain java.nio.file##links Symbolic links}
* are automatically redirected to the <i>target</i> of the link.
* A new {@link FileDescriptor} object is created to represent the
* connection to the file.
*
* <p>The <a id="mode">{@code mode}</a> argument specifies the access mode
* in which the file is to be opened. The permitted values and their