| 352 | |
| 353 | # Returns if file with the given modification date is archived or not |
| 354 | def isArchived(self, inner_path, modified): |
| 355 | match = re.match(r"(.*)/(.*?)/", inner_path) |
| 356 | if not match: |
| 357 | return False |
| 358 | user_contents_inner_path = match.group(1) + "/content.json" |
| 359 | relative_directory = match.group(2) |
| 360 | |
| 361 | file_info = self.getFileInfo(user_contents_inner_path) |
| 362 | if file_info: |
| 363 | time_archived_before = file_info.get("archived_before", 0) |
| 364 | time_directory_archived = file_info.get("archived", {}).get(relative_directory, 0) |
| 365 | if modified <= time_archived_before or modified <= time_directory_archived: |
| 366 | return True |
| 367 | else: |
| 368 | return False |
| 369 | else: |
| 370 | return False |
| 371 | |
| 372 | def isDownloaded(self, inner_path, hash_id=None): |
| 373 | if not hash_id: |