set modification time for the given path. if 'mtime' is None
(the default) then the file's mtime is set to current time.
Note that the resolution for 'mtime' is platform dependent.
def setmtime(self, mtime=None):
origin: path.local
where:
function source:
def setmtime(self, mtime=None):
""" set modification time for the given path. if 'mtime' is None
(the default) then the file's mtime is set to current time.
Note that the resolution for 'mtime' is platform dependent.
"""
if mtime is None:
return self._callex(os.utime, self.strpath, mtime)
try:
return self._callex(os.utime, self.strpath, (-1, mtime))
except py.error.EINVAL:
return self._callex(os.utime, self.strpath, (self.atime(), mtime))
called in /home/johnny/projects/merlinux/py/dist/py/path/local/testing/test_local.py
traceback path.local.setmtime.0
called in /home/johnny/projects/merlinux/py/dist/py/path/local/testing/test_local.py