A general directory utility funtionality