How do I get a name translation for a symbolic link inside Ruby?


#1

So I have the results of the shell command:

ln -s 20090317 latest

But I only know about ‘latest’. How do I get the 20090317? I know I
can do it
executing the shell and bringing in the string, but it seems there must
be a
method in Ruby, right?


#2

On Wed, Mar 18, 2009 at 05:10:30AM +0900, Xeno C. wrote:

So I have the results of the shell command:

ln -s 20090317 latest

But I only know about ‘latest’. How do I get the 20090317?

File.readlink


#3

Jos B. wrote:

On Wed, Mar 18, 2009 at 05:10:30AM +0900, Xeno C. wrote:

So I have the results of the shell command:

ln -s 20090317 latest

But I only know about ‘latest’. How do I get the 20090317?

File.readlink

Thank you. Staring right at me on page 471 of my old pickaxe.

xc