8220793: (fs) No support for changing modification time of symlink

Alan Bateman Alan.Bateman at oracle.com
Mon Apr 22 07:36:48 UTC 2019


On 19/04/2019 01:24, Brian Burkhalter wrote:
> For issue [1] please review the patch [2]. It implements setting the 
> access and modification times of an unfollowed symbolic link on Linux 
> and macOS.
>
> The patch uses the library function lutimes(3). The supported Unix 
> platforms for lutimes() appear to be Linux and the BSDs, but neither 
> Solaris (verified) nor AIX. Therefore the native function lutimes0() 
> is a no-op for Unix platforms other than Linux and the BSDs.
>
I'm in two minds on this, mostly because it should be very rare to want 
to change the the time stamps of a symbolic link.

In any case, can you double check setTimes - I assume it should not 
attempt to open the file when lutimes is available and the file is a sym 
link.

In passing, I wonder if folks targeting embedded/older versions of glibc 
will complain. I see lutimes has been there since glibc 2.6.

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190422/fc6482a7/attachment.html>


More information about the nio-dev mailing list