MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _storage_stats

Function _storage_stats

deployments/desktop/shared/agents.py:454–468  ·  view source on GitHub ↗
(paths: Dict[str, Any])

Source from the content-addressed store, hash-verified

452 return "0B"
453
454
455def _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

Callers 1

settingsFunction · 0.85

Calls 3

_directory_size_bytesFunction · 0.85
_format_bytesFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected