Esempio n. 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
Esempio n. 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
Esempio n. 3
0
 def is_changed(self):
     return (self.mtime != fileutils.mtime(self.fname) and self.mtime >= 0) or self.size != fileutils.size(
         self.fname
     )
Esempio n. 4
0
 def is_changed(self):
     return (self.mtime != fileutils.mtime(self.fname) and self.mtime >= 0) or \
         self.size != fileutils.size(self.fname)