MCPcopy Create free account
hub / github.com/cactus-compute/cactus / get_dir_size

Function get_dir_size

python/src/cli.py:1829–1834  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

1827 return sorted(result)
1828
1829 def get_dir_size(path):
1830 total = 0
1831 for entry in path.rglob('*'):
1832 if entry.is_file():
1833 total += entry.stat().st_size
1834 return total
1835
1836 def format_size(size_bytes):
1837 if size_bytes >= 1_000_000_000:

Callers 1

cmd_listFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected