RFR: 8341282: (fs) Move creation time fallback logic to Java layer (Linux)

Severin Gehwolf sgehwolf at openjdk.org
Tue Oct 1 16:23:39 UTC 2024


On Tue, 1 Oct 2024 16:11:08 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> 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`?

`birthtime_available` seems to more clearly indicate what's happening. Technically a zero is also valid :)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21274#discussion_r1783158313


More information about the nio-dev mailing list