RFR: 8298187: (fs) BsdFileAttributeViews::setTimes does not support lastAccessTime on HFS+ [v2]
Alan Bateman
alanb at openjdk.org
Sat Dec 10 09:19:52 UTC 2022
On Fri, 9 Dec 2022 17:58:17 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> If the path is on an HFS store, use the generic Unix implementation of `java.nio.file.attribute.BasicFileAttributeView::setTimes`to set the last access time.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8298187: Revised not to use FileStore
Removing the search of the mount points is good but we still have the issue that calling setTimes with a file creation time + another will be two syscalls. The spec for setTimes sets the expectation that the method is not atomic when setting some but not all timestamps, this is because it has to allow for implementation that needs to read the existing timestamps in order to update. The implementation change proposed here may require relaxing the spec Could you look into using file.openForAttributeAccess(followLinks) and futimes + fsetattrlist so the file is opened only once?
-------------
PR: https://git.openjdk.org/jdk/pull/11600
More information about the nio-dev
mailing list