rpath.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:rdiff-backup 作者: sol1 项目源码 文件源码
def setmtime(self, modtime):
        """Set only modtime (access time to present)"""
        log.Log(lambda: "Setting time of %s to %d" % (self.path, modtime), 7)
        if modtime < 0: log.Log("Warning: modification time of %s is"
                                "before 1970" % self.path, 2)
        try: self.conn.os.utime(self.path, (long(time.time()), modtime))
        except OverflowError:
            log.Log("Cannot change mtime of %s to %s - problem is probably"
                    "64->32bit conversion" % (self.path, modtime), 2)
        except OSError:
            # It's not possible to set a modification time for
            # directories on Windows.
            if self.conn.os.name != 'nt' or not self.isdir():
                raise
        else: self.data['mtime'] = modtime
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号