Snapshot of file monitoring.

Completely untested, just doodling at it to get a sensible structure.

It's a bit scary with resource-management risks aplenty.