Next / Previous / Contents / Shipman's homepage

9.4. class LinkReport: Link report container

An instance of LinkReport is a container for information about the links in a given directory subtree. The information about each link is represented as a LinkInfo instance; see Section 9.8, “class LinkInfo: The PathInfo subclass”.

softlinks.py
# - - - - -   c l a s s   L i n k R e p o r t   - - - - -

class LinkReport:
    """Holds the links report for one directory subtree.

      Exports:
        LinkReport ( dir ):
          [ dir is a string ->
              if dir names a directory to which we have access ->
                return a LinkReport object describing all the 
                accessible links in that directory's subtree
              else -> raise OSError ]
        .genLinks():
          [ generate the links in self as a sequence of
            LinkInfo instances, in ascending order by path name ]

      Class invariants:
        .__linkList:
          [ a list of LinkInfo objects representing the soft
            links in self ]            
    """