Format directory tree with list elems