RFR: 8316304: (fs) Add support for BasicFileAttributes.creationTime() for Linux
Severin Gehwolf
sgehwolf at openjdk.org
Tue Sep 19 14:48:39 UTC 2023
On Tue, 19 Sep 2023 14:17:56 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> Is statx a complete superset of stat? If so, then the prototype should use it instead of stat, not in addition, meaning there should be one syscall rather than two.
The reason why I've chosen this one so far is two fold: a) What to do if `statx` is not available? (`glibc < 2.28` and/or `kernel < 4.11`) b) it seems much less risky that way, as we are only changing creationTime reporting. Everything else remains unchanged. Thus, a better fit for backports. a) seems a blocker for older systems, so we would need two separate implementations anyway?
> If this goes ahead then I think should look at what it would take to move it src/java.base/linux, meaning the LinuxFileSystemProvider.
Incidentally, that's what my initial version was using and I've reconsidered going with this one instead since the complexity seemed not worth it. It would need to delegate to `UnixFileAttributes` anyway for older systems and the gist of the patch would be the native parts.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15792#issuecomment-1725790579
More information about the nio-dev
mailing list