Next / Previous / Contents / TCC Help System / NM Tech homepage

15.9. RelaxValidator.__getModTime(): When was this file last changed?

The returned value is an epoch time, the number of seconds since January 0, 1970.
# - - -   R e l a x V a l i d a t o r . _ _ g e t M o d T i m e

    def __getModTime(self, fileName):
        '''Try to retrieve a file's modification timestamp.

          [ fileName is a string ->
              if fileName does not exist ->
                raise OSError
              if we can stat fileName ->
                return that file's modification epoch time
              else -> raise IOError ]
        return os.stat(fileName)[stat.ST_MTIME]