Skip to main content

Module file

Module file 

Source
Expand description

Configuration file support for persistent settings.

This module provides support for loading configuration from a TOML file located at ~/.config/clean-dev-dirs/config.toml (or the platform-specific equivalent). Configuration file values serve as defaults that can be overridden by CLI arguments.

§Layering

The precedence order is: CLI argument > config file > hardcoded default.

§Example config

project_type = "rust"
# Single directory (legacy):
# dir = "~/Projects"
# Multiple directories:
# dirs = ["~/Projects", "~/work/client"]

[filtering]
keep_size = "50MB"
keep_days = 7
sort = "size"
reverse = false
# name_pattern = "my-*"

[scanning]
threads = 4
verbose = true
skip = [".cargo", "vendor"]
ignore = [".git"]
max_depth = 5

[execution]
keep_executables = true
interactive = false
dry_run = false
use_trash = true    # default; set to false for permanent deletion

Structs§

FileConfig
Top-level configuration file structure.
FileExecutionConfig
Execution options from the configuration file.
FileFilterConfig
Filtering options from the configuration file.
FileScanConfig
Scanning options from the configuration file.

Functions§

expand_tilde
Expand a leading ~ in a path to the user’s home directory.