Skip to main content

Module du

Module du 

Source

Structs§

DuConfig
Configuration for the du command.
DuEntry
A single entry produced by du traversal.

Functions§

du_path
Traverse path and collect DuEntry results according to config.
format_size
Format a size value for display according to the config.
format_time
Format a modification time for display.
glob_match
Simple glob matching supporting * and ? wildcards.
parse_block_size
Parse a block size string like “1K”, “1M”, “1G”, etc. Returns the number of bytes per block.
parse_threshold
Parse a threshold value. Positive means “exclude entries smaller than SIZE”. Negative means “exclude entries larger than -SIZE”.
print_entry
Print a single DuEntry.
read_exclude_file
Read exclude patterns from a file (one per line).