Skip to main content

Module size

Module size 

Source
Expand description

Size parsing and manipulation utilities.

This module provides functions for parsing human-readable size strings (like “100MB” or “1.5GiB”) into byte values, and for measuring directory sizes on disk.

Functions§

calculate_dir_size
Calculate the total size of a directory and all its contents, in bytes.
parse_size
Parse a human-readable size string into bytes.