Add function to search directory using namespace.