From: "kwilczynski (Krzysztof Wilczynski)" Date: 2012-10-19T03:54:44+09:00 Subject: [ruby-core:48070] [ruby-trunk - Feature #7106] FileUtils.touch should allow touching the symlink itself rather than the file the link points to Issue #7106 has been updated by kwilczynski (Krzysztof Wilczynski). File 0001-Add-support-for-lutimes-3-to-file.c-as-File-lutime.patch added File 0002-Add-support-for-File-lutimes-on-Windows.patch added File 0003-Add-support-for-File-lutimes-to-FileUtils.patch added Hey, Small updates regarding this :) Support for nanoseconds in Linux kernel for VFS and stat(2) was added around 2.5.38[1]. Then, adding support of lutimes(3) was already mentioned here: http://bugs.ruby-lang.org/issues/4052 Said that, I have made three small patches that try to address lack of File::lutimes and support for symbolic links in FileUtils::touch. There is no support for the trick involving rename(2) mentioned previously (don't think such measures are needed), plus implementation is agnostic from whether an underlying architecture supports nanoseconds for atime, mtime and ctime, or not -- this was addressed to some extent already in the code (although, I am not sure about FAT on Windows, as support for any of these there seems to be rather odd). Anyhow, I would be very grateful is somebody could review them, especially the Windows one as I am not sure if this would be the correct way of handling how to update access and modification time on Windows. This is my first contribution and I am sure it is far from being perfect, but I did run make test-all on many different versions of Linux distributions with different kernel versions in order to make sure that it works as expected. I need to install NetBSD and FreeBSD and test it there. I hope that helps :) 1. http://lwn.net/Articles/10634/ KW ---------------------------------------- Feature #7106: FileUtils.touch should allow touching the symlink itself rather than the file the link points to https://bugs.ruby-lang.org/issues/7106#change-31022 Author: cirrusthinking (Alessandro Diaferia) Status: Open Priority: Normal Assignee: Category: core Target version: 1.9.3 Most systems support POSIX lutimes sys call that allows a symlink to be touched. I'd like to see this feature implemented. Unfortunately I'd like to see this feature on Solaris as soon as possible but I cannot see lutimes syscall supported there. -- http://bugs.ruby-lang.org/