Does Ruby has built-in way to traverse symlinks?

I have a code that uses Dir[data_dir + ‘/**/*’] to get all the files.

But this doesn’t work when some directories as symbolic links.

I’ve googled around but couldn’t find a built-in way to do this. So it
seems I’ll have to write my own code.

Isn’t this functionaity desired by other programmers? Am I the only soul
in the world who needs this? Souldn’t this be filed as a feature request
for Ruby?

If anybody has some short code to do this, I’d be happy to see it (I can
do this myself, but people here sometimes amaze me with clever/compact
thinking).

File.readlink()

Works?

But yes, file a feature request. If the use case is logic and can be
explain.

I myself dislike the distinction of
File and
FileUtils

behaving differently. :confused:

One has .cp_r
the other one does not …