RFR: 8338696: (fs) BasicFileAttributes.creationTime() falls back to epoch if birth time is unavailable (Linux)
Alan Bateman
alanb at openjdk.org
Wed Aug 21 09:51:08 UTC 2024
On Tue, 20 Aug 2024 21:21:10 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Set the value returned by `BasicFileAttributes.creationTime()` on Linux to the birth time, if available, otherwise return the last modified time.
Marked as reviewed by alanb (Reviewer).
src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c line 608:
> 606: //
> 607: // Birth time was not filled in: fall back to last modification time
> 608: //
I guess is okay although I think I'd much prefer to decide this in the Java code. Maybe we can re-examine this again in the future.
Minor nit, can you use the same comment style as the other comments in the code, meaning drop the empty comment lines, only to keep it consistent with the other comments in this function and elsewhere.
-------------
PR Review: https://git.openjdk.org/jdk/pull/20655#pullrequestreview-2250329493
PR Review Comment: https://git.openjdk.org/jdk/pull/20655#discussion_r1724769397
More information about the nio-dev
mailing list