(paths: Dict[str, Any])
| 452 | return "0B" |
| 453 | |
| 454 | |
| 455 | def _storage_stats(paths: Dict[str, Any]) -> Dict[str, Any]: |
| 456 | tracked = [ |
| 457 | paths.get("pdf_dir"), |
| 458 | paths.get("reading_reports_dir"), |
| 459 | paths.get("wiki_dir"), |
| 460 | ] |
| 461 | total = 0 |
| 462 | for raw_path in tracked: |
| 463 | if not raw_path: |
| 464 | continue |
| 465 | total += _directory_size_bytes(Path(str(raw_path)).expanduser()) |
| 466 | return { |
| 467 | "cache_bytes": total, |
| 468 | "cache_display": _format_bytes(total), |
| 469 | } |
| 470 | |
| 471 |
no test coverage detected