-
-
Save shugo/c074da8dedf79ea3b56d860751c0e64c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
regular_file = "./regular" | |
symlinkfile = "./symlink" | |
File.delete(regular_file) rescue nil | |
File.delete(symlinkfile) rescue nil | |
File.open(regular_file, "w") {} | |
File.symlink(regular_file, symlinkfile) | |
p File.lstat(symlinkfile).atime | |
t = Time.local(2000) | |
stat = File.lstat(symlinkfile) | |
sleep 1 | |
File.utime(t, t, symlinkfile) | |
p File.stat(regular_file).atime | |
p File.lstat(symlinkfile).atime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment