예제 #1
0
 def __init__(self, fname, md5=""):
     assert isinstance(fname, unicode)
     """fname : 文件绝对路径, unicode"""
     self.fname = fname
     self.md5 = md5.lower()
     self.mtime = fileutils.mtime(fname)
     self.size = fileutils.size(fname)
     self.isFile = True
예제 #2
0
 def __init__(self, fname, md5=''):
     assert isinstance(fname, unicode)
     '''fname : 文件绝对路径, unicode'''
     self.fname = fname
     self.md5 = md5.lower()
     self.mtime = fileutils.mtime(fname)
     self.size = fileutils.size(fname)
     self.isFile = True
예제 #3
0
 def is_changed(self):
     return (self.mtime != fileutils.mtime(self.fname) and self.mtime >= 0) or self.size != fileutils.size(
         self.fname
     )
예제 #4
0
 def is_changed(self):
     return (self.mtime != fileutils.mtime(self.fname) and self.mtime >= 0) or \
         self.size != fileutils.size(self.fname)