build dir struct