(
self, path: str | PathLike[str], info: MediaPipeline.SpiderInfo
)
| 125 | absolute_path.write_bytes(buf.getvalue()) |
| 126 | |
| 127 | def stat_file( |
| 128 | self, path: str | PathLike[str], info: MediaPipeline.SpiderInfo |
| 129 | ) -> StatInfo: |
| 130 | absolute_path = self._get_filesystem_path(path) |
| 131 | try: |
| 132 | last_modified = absolute_path.stat().st_mtime |
| 133 | except OSError: |
| 134 | return {} |
| 135 | |
| 136 | with absolute_path.open("rb") as f: |
| 137 | checksum = _md5sum(f) |
| 138 | |
| 139 | return {"last_modified": last_modified, "checksum": checksum} |
| 140 | |
| 141 | def _get_filesystem_path(self, path: str | PathLike[str]) -> Path: |
| 142 | path_comps = _to_string(path).split("/") |
nothing calls this directly
no test coverage detected