Is there a method that, given a symlink, returns what the symlink is
linked to? Obviously ls(1) has this information, and stat(1), but I’m
not seeing a way to get it in Ruby.
Quoteing cyclists@nc.rr.com, on Mon, Jun 30, 2003 at 10:18:10PM +0900:
Is there a method that, given a symlink, returns what the symlink is
linked to? Obviously ls(1) has this information, and stat(1), but I’m
There is a stat utility?
readlink(2) give this info.
not seeing a way to get it in Ruby.
$ ri File.readlink
--------------------------------------------------------- File::readlink
File.readlink( fileName ) → fileName
···
Returns the given symbolic link as a string. Not available on all
platforms.
File.symlink("testfile", "link2test") #=> 0
File.readlink("link2test") #=> "testfile"
File.readlink
“Tim Hunter” cyclists@nc.rr.com schrieb im Newsbeitrag
news:pan.2003.06.30.12.10.43.176452@nc.rr.com…
···
Is there a method that, given a symlink, returns what the symlink is
linked to? Obviously ls(1) has this information, and stat(1), but I’m
not seeing a way to get it in Ruby.