This class is a container for a list of
OldInfo objects. Because of the behavior
sorting this list puts the entries into reverse
The constructor takes the pathname of the directory
subtree as an argument, builds the list of
OldInfo objects, and sorts them. You can
.genFiles() method and
it will generate the contained
OldInfo objects in reverse chronological
Again, this class is just about identical to the
corresponding class in the
bigfiles.py script; see
Section 7.8, “
The class for the whole application”.
# - - - - - c l a s s O l d R e p o r t - - - - - class OldReport: """Holds the old-files report. Exports: OldReport ( dir ): [ dir is a string -> if dir names a directory to which we have access -> return an OldReport object describing all the accessible files in that directory's subtree else -> raise OSError ] .genFiles(): [ generate a sequence of OldInfo objects representing the files in self, in reverse chronological order by modification timestamp ] Class invariants: .__oldList: [ a list of information on all the files in self as OldInfo objects, sorted ] """