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

Brian Burkhalter bpb at openjdk.org
Fri Aug 5 17:27:06 UTC 2022


On Fri, 5 Aug 2022 17:04:35 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8151430: Minor format cleanup in BsdBasicFileAttributeView; remove extraneous file
>
> src/java.base/macosx/classes/sun/nio/fs/BsdFileSystemProvider.java line 81:
> 
>> 79:             UnixPath file = UnixPath.toUnixPath(obj);
>> 80:             boolean followLinks = Util.followLinks(options);
>> 81:             return new BsdBasicFileAttributeView(file, followLinks);
> 
> PosixFileAttributeView extends BasicFileAttributeView so it's possible to obtain the former and invoke setTimes too. I need to think more on how to make that work.

Perhaps `setTimes()` could be moved to a static method invoked by both `BsdBasicFileAttributeView` and a new `BsdPosixFileAttributeView`?

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

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


More information about the nio-dev mailing list