Skip to content
Stateful directory scanning in Python. Makes a great ~/.Trash cleaner.
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
test
.gitignore
README.textile
cleanup.py
com.newartisans.cleanup.plist
dirscan.py
test_dirscan.py
verify.py

README.textile

Stateful directory scanning in Python

The enclosed module, dirscan.py, is intended for doing repeated scans of the
same directory over time, and taking action based on any changes (or lack
thereof) found there.

I use it mainly to clean up my trash directory and continuously verify the
integrity of my file archives. See cleanup.py for an example of how I do
this, along with its associated launchctl script. It’s designed to be
extremely efficient in the use of memory and CPU, so that it doesn’t bog down
the system even should you choose to run it hourly (I run it once a day).

John Wiegley <johnw@newartisans.com>

Something went wrong with that request. Please try again.