The stat module has a predicate
for testing for soft links: S_ISLNK().
# - - - P a t h I n f o . i s D i r - - -
def isLink ( self ):
"""Predicate to test whether this path is a soft link.
[ if self represents a soft link ->
return a true value
else ->
return a false value ]
"""
return stat.S_ISLNK ( self.mode )