I am creating a series of symbolic links to target directories. I wish
to check to see if the symbolic link exists or not. When I do this
File.stat(@soft_link_target).ftype.should == ‘link’
I get this:
expected: "link", got: "directory" (using ==)
Which tells me that the link is there but it is reporting the target
directory and not the link itself. How do I tell if the thing that I am
checking is a symbolic link to a directory and not the directory itself?