Here is the source code for the pathinfo.py module containing
the PathInfo class.
The code for the pathinfo.py module starts with the
conventional Python documentation string.
"""pathinfo.py: Object to represent a snapshot of a file's status.
For documentation in "literate programming" style, see:
http://www.nmt.edu/help/lang/python/examples/pathinfo/
"""
Next comes the importation of the standard Python modules we use:
The os module supports Posix
file systems and other operating system functions.
The stat module supplies
additional declarations needed for interpreting the
information that comes out of the os.stat() and os.lstat() functions.
We use the time module for
translating and formatting file timestamps. In
Python 2.3 and later, the datetime module is now recommended, but
we'll use the older version out of consideration for
those who have older Python installs.
#================================================================ # Imports #---------------------------------------------------------------- import os, stat, time