# Portability: UNIVERSAL
# Last validated: 2026-05-17
# Next review: 2027-05-17

BACH Trash handler (trash system)
--------------------------------------

The trash system allows soft delete with restore.

COMMANDS
-------
bach trash list            All trash entries
bach trash delete PATH     File in trash
bach trash restore ID      Restore file
bach trash purge           Delete expired ones
bach trash info ID         Show details

OPTIONS
--------
--dry-run Only simulate changes

EXAMPLES
---------
# File delete
bach trash delete ./alte_datei.txt

# Show content
bach trash list

# Restore
bach trash restore 5

# Clean up expired (30+ days)
bach trash purge --dry-run
bach trash purge

TECHNICAL
---------
- Handler: system/hub/trash.py
- Files are moved to system/data/trash/
- Metadata in DB table: files_trash
- Standard retention: 30 days (retention_days)
- Status: active, restored, purged

DATABASE
---------
Table: files_trash (system/db/schema.sql)
- id: PRIMARY KEY
- original_path: Original path
- trash_path: Path in the trash
- size: file size in bytes
- deleted_at: deletion time (ISO-8601)
- deleted_by: username (default: "claude")
- retention_days: retention (default: 30)
- expires_at: expiry date (ISO-8601)
- status: active/restored/purged
- restored_at: restoration time
- purged_at: Final deletion

SEE ALSO
----------
bach maintain help    Maintenance tools
bach backup help      Backup system
bach trash help       Inline help
