Finds files older than X, presents a flat scrollable view with exclusion/inclusion and shortcuts to advance, digging down directories until no more files are unknown. Allows deleting all included files.
3 pane view: left is delete, middle is todo, right is keep
Enter opens dir, left right up down navigate between panes and dirs, a means delete, d means keep, ws enter leave dirs, esc leaves dirs
Sort by least recently modified. Kept dirs get mtime bump.
Keep parent delete child totally fine. Deleting parent but keeping child is bad: delete around kept children. Check for superset deletion and prune children that will get deleted anyway.
Store keep/delete as trees with dirs as nodes and children in a set. Make doubly linked so nodes can be removed/inserted easily. Add undo/redo stack with list of nodes and their inverse ops (e.g. delete/insert this node). If deleting kept child, start at child and expand up to parent, adding all not-child path dirs to the deletion set and the child path nodes to the keep set.
Rust TUI tool to remove unused files
Finds files older than X, presents a flat scrollable view with exclusion/inclusion and shortcuts to advance, digging down directories until no more files are unknown. Allows deleting all included files.
3 pane view: left is delete, middle is todo, right is keep Enter opens dir, left right up down navigate between panes and dirs, a means delete, d means keep, ws enter leave dirs, esc leaves dirs
Sort by least recently modified. Kept dirs get mtime bump.
Keep parent delete child totally fine. Deleting parent but keeping child is bad: delete around kept children. Check for superset deletion and prune children that will get deleted anyway.
Store keep/delete as trees with dirs as nodes and children in a set. Make doubly linked so nodes can be removed/inserted easily. Add undo/redo stack with list of nodes and their inverse ops (e.g. delete/insert this node). If deleting kept child, start at child and expand up to parent, adding all not-child path dirs to the deletion set and the child path nodes to the keep set.