'Get the node that this link points at.
If the path is invalid, raise a NoSuchFile exception. If the level of
indirection of symlinks is 100 levels deep, raise a TooManySymlinks
exception.'

def dereference(self):

    global _symrefs
    if (_symrefs > 100):
        raise TooManySymlinks(('too    many    levels    of    symlinks:    %r' % self.fullname()))
    _symrefs += 1
    try:
        return self.parent.lresolve(self.readlink(), stay_inside_fs=True)
    except NoSuchFile:
        raise NoSuchFile(('%s:    broken    symlink    to    %r' % (self.fullname(), self.readlink())))
    finally:
        _symrefs -= 1
