traversal directory function establish