Unify access to file and directory monitoring.