Write timestamp file when changes are detected.
(self)
| 675 | return None |
| 676 | |
| 677 | def _write_timestamp_file(self) -> None: |
| 678 | """Write timestamp file when changes are detected.""" |
| 679 | if self.timestamp_file is None: |
| 680 | return |
| 681 | try: |
| 682 | self.timestamp_file.parent.mkdir(parents=True, exist_ok=True) |
| 683 | timestamp_data = { |
| 684 | "timestamp": time.time(), |
| 685 | "subpath": self.subpath, |
| 686 | } |
| 687 | with open(self.timestamp_file, "w") as f: |
| 688 | json.dump(timestamp_data, f, indent=2) |
| 689 | except OSError: |
| 690 | pass |
no test coverage detected