equal
deleted
inserted
replaced
308 self_sec = self._mtime_s |
308 self_sec = self._mtime_s |
309 if self_sec is None: |
309 if self_sec is None: |
310 return False |
310 return False |
311 self_ns = self._mtime_ns |
311 self_ns = self._mtime_ns |
312 other_sec, other_ns, second_ambiguous = other_mtime |
312 other_sec, other_ns, second_ambiguous = other_mtime |
313 return self_sec == other_sec and ( |
313 if self_sec != other_sec: |
314 self_ns == other_ns or self_ns == 0 or other_ns == 0 |
314 # seconds are different theses mtime are definitly not equal |
315 ) |
315 return False |
|
316 elif other_ns == 0 or self_ns == 0: |
|
317 # at least one side as no nano-seconds information |
|
318 |
|
319 if self._mtime_second_ambiguous: |
|
320 # We cannot trust the mtime in this case |
|
321 return False |
|
322 else: |
|
323 # the "seconds" value was reliable on its own. We are good to go. |
|
324 return True |
|
325 else: |
|
326 # We have nano second information, let us use them ! |
|
327 return self_ns == other_ns |
316 |
328 |
317 @property |
329 @property |
318 def state(self): |
330 def state(self): |
319 """ |
331 """ |
320 States are: |
332 States are: |