Update of /cvsroot/jython/jython/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv8506
Modified Files:
javapath.py
Log Message:
Fix for "[ #477608 ] os.path.getmtime() missing".
Added getmtime() and getatime(). The value for access time is actually
the modification time (same as in the os.stat() method).
Index: javapath.py
===================================================================
RCS file: /cvsroot/jython/jython/Lib/javapath.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** javapath.py 2001/07/24 20:11:16 1.6
--- javapath.py 2001/11/03 15:59:24 1.7
***************
*** 229,230 ****
--- 229,241 ----
raise OSError(0, 'No such file or directory', path)
return size
+
+ def getmtime(path):
+ f = File(path)
+ return f.lastModified() / 1000.0
+
+ def getatime(path):
+ # We can't detect access time so we return modification time. This
+ # matches the behaviour in os.stat().
+ f = File(path)
+ return f.lastModified() / 1000.0
+
|