RFR: 8356493: (fs) SecureDirectoryStream missing some capabilities
Alan Bateman
alanb at openjdk.org
Sat Aug 30 14:31:43 UTC 2025
On Wed, 27 Aug 2025 00:07:38 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Add several methods to `java.nio.file.SecureDirectoryStream`.
src/java.base/share/classes/java/nio/file/SecureDirectoryStream.java line 141:
> 139: * Creates a new and empty file, failing if the file already exists.
> 140: *
> 141: * <p>This method works in a similar manner to {@linkplain Files#createFile
I think this method can use "This method works in exactly the manner specified".
src/java.base/share/classes/java/nio/file/SecureDirectoryStream.java line 171:
> 169: * @since 26
> 170: */
> 171: Path createFile(Path path, FileAttribute<?>... attrs)
I assume the parameter should be of type T (same comment on the other methods)
src/java.base/share/classes/java/nio/file/SecureDirectoryStream.java line 250:
> 248: */
> 249: Path createLink(T link, SecureDirectoryStream<T> targetdir, T existing)
> 250: throws IOException;
I realize this models a pair of dfd/path tuples and mklinkat but I wonder about the usability and whether we really need this. In other, maybe we should drop this method from the proposal for now.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26950#discussion_r2311960667
PR Review Comment: https://git.openjdk.org/jdk/pull/26950#discussion_r2311963818
PR Review Comment: https://git.openjdk.org/jdk/pull/26950#discussion_r2311964305
More information about the nio-dev
mailing list