File.readlink(filename) Returns the given symbolic link as a string. Not available on all platforms.
puts File.symlink("testfile", "link2test") puts File.readlink("link2test")