RFR: 8341282: (fs) Move creation time fallback logic to Java layer (Linux)
Brian Burkhalter
bpb at openjdk.org
Tue Oct 1 16:13:39 UTC 2024
On Tue, 1 Oct 2024 08:52:46 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
>> Move the decision as to whether `BasicFileAttributes.creationTime()` falls back to the modified time from the native layer to the Java layer.
>
> src/java.base/unix/classes/sun/nio/fs/UnixFileAttributes.java line 61:
>
>> 59: private long st_birthtime_sec;
>> 60: private long st_birthtime_nsec;
>> 61: private boolean birthtime_invalid;
>
> Suggestion:
>
> private boolean birthtime_filled_in;
>
>
> Perhaps we should add a comment that this is Linux-only and will only be true for Linux filesystems that support birth time.
Maybe `birthtime_valid` or `birthtime_available`?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21274#discussion_r1783146283
More information about the nio-dev
mailing list