RFR: 8151430: (fs) BasicFileAttributeView.setTimes should support setting file create time on OS X [v5]

Alan Bateman alanb at openjdk.org
Tue Aug 9 07:20:20 UTC 2022


On Mon, 8 Aug 2022 22:26:04 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Use the BSD system call `setattrlist(2)` to set file modification, access, and creation time attributes on macOS.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8151430: Refactor for better encapsulation

src/java.base/macosx/classes/sun/nio/fs/BsdFileSystemProvider.java line 70:

> 68:             boolean followLinks = Util.followLinks(options);
> 69:             return (V) BsdFileAttributeViews.createPosixView(file, followLinks);
> 70:         }

The update that is 10deb03d looks quite good. I just wonder about the duplicate in BsdFileSystemProvider. Maybe it could test for UserDefiendFileAttributeFIleView, BasicFileAttrinuteView or PosixFileAttributeView so that the parameters are only processed in one place rather than 3.

-------------

PR: https://git.openjdk.org/jdk/pull/9762


More information about the nio-dev mailing list