a recursive detective for directory.