RFR: 8316304: (fs) Add support for BasicFileAttributes.creationTime() for Linux [v3]
David Voit
duke at openjdk.org
Mon Oct 2 18:06:36 UTC 2023
On Mon, 2 Oct 2023 13:07:56 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
>> src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c line 212:
>>
>>> 210:
>>> 211: #if defined(_DARWIN_FEATURE_64_BIT_INODE) || defined(__linux__)
>>> 212: static jfieldID attrs_st_birthtime_sec;
>>
>> birthtime_nsec missing? Just set it to zero on darwin and use the value under linux?
>
> I've deliberately omitted that change here, not sure if this change of behaviour is wanted as it would add a field in `UnixFileAttributes` (it was part of the v2 patch). @bplb @AlanBateman Thoughts? I can include it of course, but don't want to go in circles.
Understood, seems just a little bit silly that a limitation in a different kernel (darwin) artificially limits the birthtime here, while it easily accessible with statx. Otherwise this patch series looks quite good!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15792#discussion_r1342996360
More information about the nio-dev
mailing list