Next / Previous / Contents / Shipman's homepage

6.7. PathInfo.isLink(): Is this a soft link?

The stat module has a predicate for testing for soft links: S_ISLNK().

pathinfo.py
# - - -   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 )