file-chase-links

file-chase-links is a compiled Lisp function in `files.el'.

(file-chase-links FILENAME &optional LIMIT)

Chase links in FILENAME until a name that is not a link.
Unlike `file-truename', this does not check whether a parent
directory name is a symbolic link.
If the optional argument LIMIT is a number,
it means chase no more than that many links and then stop.