Add directory detector