Next / Previous / Contents / Shipman's homepage

6.3. class PathInfo

The rest of the code in this module is inside the PathInfo class. We state here in the class's documentation string the class invariants: conditions that must always be true once the constructor has completed.

pathinfo.py
#================================================================
# Functions and classes
#----------------------------------------------------------------


# - - - - -   c l a s s   P a t h I n f o   - - - - -

class PathInfo:
    """Represents a snapshot of one file's status.

      Class invariants:
        .path:
          [ the pathname passed to the class constructor ]
        .size:
          [ self.path's size in bytes as an integer ]
        .createEpoch:
          [ the epoch time when self.path was created ]
        .modEpoch:
          [ the epoch time when self.path was last modified ]
        .mode:
          [ the mode bits for self.path ]
"""